Menu
abriraqui
  • reflexiones
  • publicaciones
  • hackership
  • experiencias
abriraqui

sign_out not working with devise DELETE method

Posted on January 17, 2013

Tweet

I’m using devise and I still not know when exactly stopped working the sign_out, but at some point the route

http://localhost:3000/users/sign_out

gave a routing error. For the moment, until I can really understand why is not working any more, I found some solution in a forum (lost the link, sorry :-/), where someone had posted the same problem.

So here is the solution, to overwrite the DELETE method with the GET method, so you need to add to the routes.rb file the following line:

devise_for :users do get '/users/sign_out' => 'devise/sessions#destroy' end

Now the users can log out!!!

1 thought on “sign_out not working with devise DELETE method”

  1. Rama says:
    February 11, 2014 at 5:29 am

    Thanks!..now it works fine

Comments are closed.

©2023 abriraqui | Powered by SuperbThemes & WordPress