1

My problem is that I do not see any error messages when Devise sign in failed. When this happens I got redirected to Devise::SessionsController#new which is not setting any errors

Started POST "/users/sign_in" for 127.0.0.1 at 2014-08-17 06:30:59 +0300
Processing by Devise::SessionsController#create as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"4ZgT4DtyyNYNGHRbwCVASolL3CQEqIeMtPlOOy7EBik=", "user"=>{"username"=>"setdddd", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Войти"}
Completed 401 Unauthorized in 3ms
Processing by Devise::SessionsController#new as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"4ZgT4DtyyNYNGHRbwCVASolL3CQEqIeMtPlOOy7EBik=", "user"=>{"username"=>"setdddd", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Войти"}
[]
  Rendered devise/shared/_links.erb (0.1ms)
  Rendered devise/sessions/new.html.erb within layouts/application (40.0ms)
  Rendered application/_header.erb (0.5ms)
  Rendered application/_footer.erb (0.0ms)
Completed 200 OK in 50ms (Views: 47.8ms | ActiveRecord: 0.0ms)

So the question is are there any switches in devise configuration that allow me to show error message to user, not just a redirect?

SET001
  • 11,480
  • 6
  • 52
  • 76
  • maybe [this](http://stackoverflow.com/questions/4101641/rails-devise-handling-devise-error-messages) post can help. – Cyzanfar Aug 17 '14 at 03:53

1 Answers1

1

Are you outputting your flash messages where appropriate? It looks like devise sets flash[:notice] and flash[:alert] depending on the situation (i.e. failed login, etc). It's up to you to ensure that you output those values to your page. See the devise README for more details.

jmif
  • 1,192
  • 2
  • 14
  • 22