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

前端 未结 19 1652
谎友^
谎友^ 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 18:59

    @creamhost say,

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

    but it is not correct solution for me (Rails4). I solved our problem (@Olives' answer),

    link_to :logout, destroy_member_session_path, method: :delete
    

提交回复
热议问题