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.
17 lines
520 B
Ruby
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
|