removed person can't be blank error message
This commit is contained in:
parent
a9eef6018c
commit
2b650e6b6d
2 changed files with 7 additions and 2 deletions
|
|
@ -45,7 +45,10 @@ class InvitationsController < Devise::InvitationsController
|
|||
user.seed_aspects
|
||||
rescue Exception => e
|
||||
user = nil
|
||||
flash[:error] = e.message
|
||||
record = e.record
|
||||
record.errors.delete(:person)
|
||||
|
||||
flash[:error] = record.errors.full_messages.join(", ")
|
||||
end
|
||||
|
||||
if user
|
||||
|
|
|
|||
|
|
@ -13,7 +13,9 @@ class RegistrationsController < Devise::RegistrationsController
|
|||
sign_in_and_redirect(:user, @user)
|
||||
Rails.logger.info("event=registration status=successful user=#{@user.diaspora_handle}")
|
||||
else
|
||||
flash[:error] = @user.errors.full_messages.join(', ')
|
||||
@user.errors.delete(:person)
|
||||
|
||||
flash[:error] = @user.errors.full_messages.join(";")
|
||||
Rails.logger.info("event=registration status=failure errors='#{@user.errors.full_messages.join(', ')}'")
|
||||
render :new
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue