ruby on rails - Devise - No route matches [GET] "/users/sign_out: Any alternatives to requiring jquery-ujs, setting config.sign_out_via = :get, or using button_to? -


i using devise large app multiple engines , looking alternative solution 3 options given below destroy user's session path:

  1. require jquery-ujs
  2. change config.sign_out_via = :delete config.sign_out_via = :get
  3. use button_to instead of link_to

i'm require jquery-ujs , able log out, prefer not have use dependency solution.

= link_to 'log out', destroy_user_session_path, method: :delete

i settle require jquery-ujs if necessary, hoping out there knows solution. thanks!

you can add additional route app point standard devise log out action.

devise_scope :user   '/users/sign_out', to: 'devise/sessions#destroy' end 

then you'll have log out via both delete , get


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

visual studio 2010 - Connect to informix database windows form application -

android - Associate same looper with different threads -