Couldn't find User with id=sign_out

前端 未结 6 1829
粉色の甜心
粉色の甜心 2021-01-04 15:19

Sign-out link isn\'t working in my rails application.

I have checked my routes.rb which is listed below and my application.html.erb looks to follow the right path.

6条回答
  •  难免孤独
    2021-01-04 15:37

    None of this solutions worked for me. Also it happens just in development mode for me... I fixed it by adding

      if params[:id] = "sign_out"
        sign_out current_user
        return
      end
    

    in the set user function. Not the prettiest solution but it works...

提交回复
热议问题