【问题标题】:Rails routing error for sessions会话的 Rails 路由错误
【发布时间】:2013-08-02 04:31:36
【问题描述】:

我突然遇到路由错误:

Routing Error No route matches [GET] "/signout"

这是 rake 路由的输出:

signout DELETE /signout(.:format)                          sessions#destroy

这是视图:

<li><%= link_to "Log out", signout_path, method: "delete" %></li>

任何想法

【问题讨论】:

标签: ruby-on-rails ruby routing routes


【解决方案1】:
<li><%= link_to "Log out", signout_path, method: :delete %></li>

尝试删除作为符号。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-01-13
    • 2010-12-26
    • 1970-01-01
    • 2012-05-22
    • 2012-07-11
    相关资源
    最近更新 更多