Use devise to manage users and handle errors in new registrations
It was easy with the render method
, but I couldn't handle the sign-in error, so I'll investigate and summarize it.
sessions/new.erb
<%= alert %>
Describe where you want to display.
With this description, when an error occurs, a message such as "The password is incorrect" is displayed. It seems that it is not possible to display how many errors there are and which part is the error, as in the case of new registration.
If you want to display the error message in Japanese,
Create a devise.ja.yml
file in config / locales
and
Paste this.
It's a complete mystery why you only have to use this method for sign-in and why you can get an error message with it.
Recommended Posts