Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird error message #259

Closed
stephenbaidu opened this issue Jun 2, 2015 · 1 comment
Closed

Weird error message #259

stephenbaidu opened this issue Jun 2, 2015 · 1 comment

Comments

@stephenbaidu
Copy link

The error message returned when email is already in use becomes weird in full_messages. This is as a result of the following line in models/devise_token_auth/concerns/user.rb
errors.add(:email, :already_in_use, default: "This email address is already in use")

Since rails concatenates the field to associated errors for full_messages, this becomes
Email This email address is already in use

I suggest the offending line be changed to
errors.add(:email, :already_in_use, default: "address is already in use")

Or better still, an extra line can be added like below

errors.add(:email, :already_in_use, default: "address is already in use")
errors.add(:base, "This email address is already in use")

I would also like to know if this behaviour was requested earlier.

@booleanbetrayal
Copy link
Collaborator

This should be addressed as part of some recent localization changes. Can re-open as needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants