【发布时间】:2011-06-16 17:30:59
【问题描述】:
我希望能够做到以下几点:
change_pass_user_path(usuario)
在“link_to”中(例如)。
其中“change_pass”是我在“用户”控制器中的操作名称。
我已经添加了这个:
map.resources :用户
到我的路线文件。 (所以我已经能够执行以下操作:edit_user_path)
我已经试过了:
map.resources :users do
get 'change_pass'
end
但它返回此错误:
main:Object 的未定义方法 `get' (NoMethodError)
我该怎么做?
谢谢
【问题讨论】:
标签: ruby-on-rails custom-routes