rails devise, no route matches logout

后端 未结 3 411
终归单人心
终归单人心 2021-01-02 03:53

Though there\'re lots of similar questions, i\'ve searched for it for hours but still can not fix it.

Env rails 3.0.9 ruby 1.9.2 devise 1.4.2

I changed the d

3条回答
  •  有刺的猬
    2021-01-02 04:31

    I had a nearly identical problem and thanks to SO fixed it quite easily (link to my question). First, make sure you have <%= javascript_include_tag :defaults %> in your layout file "application.html.erb."

    Then, in your config -> initializers -> "devise.rb" file make sure it says:

    config.sign_out_via = :delete

    and your "sign_out" code destroy_user_session_path, :method => :delete should work.

提交回复
热议问题