diaspora/app/controllers/registrations_controller.rb
Sarah Mei c816a1f78e RegistrationsController#create re-renders the form instead of redirecting, so user doesn't lose what they've entered.
Took out RegistrationsController#update, since all it was doing was calling super.
Took out stubbing of user save, because I actually want to check that save is doing the right thing.
2010-11-04 22:51:30 -07:00

17 lines
520 B
Ruby

# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
class RegistrationsController < Devise::RegistrationsController
def create
@user = User.build(params[:user])
if @user.save
flash[:notice] = I18n.t 'registrations.create.success'
@user.seed_aspects
sign_in_and_redirect(:user, @user)
else
flash[:error] = @user.errors.full_messages.join(', ')
render :new
end
end
end