Skip to content

Commit

Permalink
Merge pull request lynndylanhurley#417 from ponyesteves/master
Browse files Browse the repository at this point in the history
Change default message for already in use error and added to english …
  • Loading branch information
lynndylanhurley committed Oct 25, 2015
2 parents 4922d90 + 0252300 commit d03793b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/models/devise_token_auth/concerns/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def token_validation_response
# only validate unique email among users that registered by email
def unique_email_user
if provider == 'email' and self.class.where(provider: 'email', email: email).count > 0
errors.add(:email, :already_in_use, default: "address is already in use")
errors.add(:email, :already_in_use)
end
end

Expand Down
4 changes: 3 additions & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ en:
errors:
validate_sign_up_params: "Please submit proper sign up data in request body."
validate_account_update_params: "Please submit proper account update data in request body."
not_email: "is not an email"
not_email: "is not an email"
message:
already_in_use: already in use
4 changes: 3 additions & 1 deletion config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ es:
errors:
validate_sign_up_params: "Los datos introducidos en la solicitud de acceso no son válidos."
validate_account_update_params: "Los datos introducidos en la solicitud de actualización no son válidos."
not_email: "no es un correo electrónico"
not_email: "no es un correo electrónico"
messages:
already_in_use: ya ha sido ocupado

0 comments on commit d03793b

Please sign in to comment.