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

Issue with capitalization when humanizing authentication keys in failure flash message #4900

Closed
cyrusstoller opened this issue Jul 6, 2018 · 5 comments

Comments

@cyrusstoller
Copy link

Thank you so much for building something that I use in almost every rails project I start.

Environment

  • Ruby 2.5.1
  • Rails 5.2.0
  • Devise 4.4.3

Current behavior

When looking at the devise.failure.not_found_in_database and devise.failure.invalid error messages, it currently says "Invalid Email or password." when the authentication_keys = :email. To me this is strange capitalization. I'm not expecting "Email" to be capitalized.

Expected behavior

I like that this takes the authentication_keys and makes them human readable, but I wish that it would make them lower case so that it read, "Invalid email or password." instead.

@cyrusstoller
Copy link
Author

I'm pretty sure this is the line that would need to be changed.

https://github.com/plataformatec/devise/blob/master/lib/devise/failure_app.rb#L106

@Arepo
Copy link

Arepo commented Jul 12, 2018

I agree with the OP fwiw - this isn't the behaviour I'd expect, all the more so for the fact that it changed in an earlier version

@tegon
Copy link
Member

tegon commented Jul 12, 2018

Duplicate of #4095. There's already a pull request opened (#4834) but it needs some changes before it can be merged.

@tegon tegon closed this as completed Jul 12, 2018
@archonic
Copy link

This issue is still present in 4.6.2. Was it intentionally merged into the 5-rc branch?

@tegon
Copy link
Member

tegon commented Apr 18, 2019

@archonic Yes - because this change does not preserve backwards compatibility.

We are going to release in version 5 though.

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

No branches or pull requests

4 participants