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:
- require jquery-ujs
- change config.sign_out_via = :delete config.sign_out_via = :get
- 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
Post a Comment