开发者

Ruby on Rails: RestAuth: how do I log out using HTTPS?

开发者 https://www.devze.com 2023-03-13 18:13 出处:网络
<%= link_to(\"Log Out\", session_url, :method => :delete) %> When I am on a non https page logging out works fine.
<%= link_to("Log Out", session_url, :method => :delete) %>

When I am on a non https page logging out works fine.

But the issue is when I am on an https page, the above code throws an error

Parameters: {"action"=>开发者_Go百科"show", "controller"=>"sessions"}

ActionController::UnknownAction (No action responded to show. Actions: create, destroy, forgot, reset, and set_time_zone):

I tried changing session_url to new_session_url, but then I got an error saying only GET requests were allowed

Any idea how to fix the problem?


Have you looked at this question: Add a logout button in RESTFUL authentication

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号