Return if there is a failure to create a user
This commit is contained in:
parent
360891496e
commit
14a5eee41c
1 changed files with 1 additions and 0 deletions
|
|
@ -9,6 +9,7 @@ class RegistrationsController < Devise::RegistrationsController
|
||||||
rescue MongoMapper::DocumentNotValid => e
|
rescue MongoMapper::DocumentNotValid => e
|
||||||
flash[:error] = e.message
|
flash[:error] = e.message
|
||||||
redirect_to new_user_registration_path
|
redirect_to new_user_registration_path
|
||||||
|
return
|
||||||
end
|
end
|
||||||
if user.save
|
if user.save
|
||||||
flash[:notice] = I18n.t 'registrations.create.success'
|
flash[:notice] = I18n.t 'registrations.create.success'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue