No route matches [GET] “/users/sign_out”

前端 未结 19 1717
谎友^
谎友^ 2020-12-04 18:44

Here is my actual error: No route matches [GET] \"/members/sign_out\" Since most people will use \"users\" I thought it would be more helpful to have that in th

19条回答
  •  清歌不尽
    2020-12-04 19:05

    Using Rails4, I had to use the following method:

    <%= link_to "Logout", destroy_admin_session_path, method: :delete %>
    

    Emphasis on where the colons are on method: and :delete

提交回复
热议问题