【发布时间】:2011-11-24 09:17:27
【问题描述】:
routes.rb
resources :project_associations, :only => [:update]
搜索路线
project_association PUT /project_associations/:id(.:format) {:action=>"update", :controller=>"project_associations"}
ERB
<%= link_to membership_command[:text], project_association_path(membership_command[:id], :command => membership_command[:command])%>
生成的 HTML
<a href="/project_associations/2011?command=suspend">Suspend</a>
点击结果: 路由错误 没有路线匹配“/project_associations/2011”
我踢了服务器,结果一样
提前感谢您的帮助。
【问题讨论】:
-
+1 用于在调试过程中启动服务器
标签: ruby-on-rails routing link-to