Conflicts: app/controllers/albums_controller.rb app/controllers/aspects_controller.rb app/controllers/photos_controller.rb app/controllers/registrations_controller.rb app/controllers/requests_controller.rb app/helpers/dashboards_helper.rb app/views/albums/show.html.haml app/views/aspects/manage.html.haml app/views/shared/_aspect_nav.haml app/views/shared/_sub_header.haml app/views/status_messages/_status_message.html.haml app/views/status_messages/show.html.haml config/locales/de.yml config/locales/en.yml config/locales/es.yml config/locales/fr.yml
28 lines
624 B
Ruby
28 lines
624 B
Ruby
# Copyright (c) 2010, Diaspora Inc. This file is
|
|
# licensed under the Affero General Public License version 3. See
|
|
# the COPYRIGHT file.
|
|
|
|
class RegistrationsController < Devise::RegistrationsController
|
|
def new
|
|
super
|
|
end
|
|
|
|
def create
|
|
begin
|
|
user = User.instantiate!(params[:user])
|
|
rescue MongoMapper::DocumentNotValid => e
|
|
user = nil
|
|
flash[:error] = e.message
|
|
end
|
|
if user
|
|
flash[:notice] = I18n.t 'registrations.create.success'
|
|
sign_in_and_redirect(:user, user)
|
|
else
|
|
redirect_to new_user_registration_path
|
|
end
|
|
end
|
|
|
|
def update
|
|
super
|
|
end
|
|
end
|