I am using the Devise gem and in the sign in page I expect that, if I don’t write anything it should give me an error. At first I thought I wasn’t showing the error, but after doing this:
<%= resource.errors.inspect %>
After doing a sign in with no values at all, I get the following:
#<ActiveModel::Errors:0x000000048ac1a0 @base=#<User id: nil, email: "", encrypted_password: "", reset_password_token: nil, reset_password_sent_at: nil, remember_created_at: nil, sign_in_count: 0, current_sign_in_at: nil, last_sign_in_at: nil, current_sign_in_ip: nil, last_sign_in_ip: nil, created_at: nil, updated_at: nil>, @messages={}>
No messages at all.
I haven’t modified the default Devise model or view, so it is pretty weird because in sign up and forget password I get the errors correctly.
Any thoughts?
Devise error messages for sign in are set in the flash hash. Try adding this in your application layout: