我在轨使用link_to
需要单一路线帮手,这是我在我的routes.rb
文件写入时获得复数:奇异路线帮手加入收藏
resources :contact_informations
产生new_contact_information
作为路由助手等。
然而,当我的资源,如下面添加一个collection
:
collection do
get :a_new_route
end
所生成的新的路线变为多个像这样:
a_new_route_contact_informations
我怎样才能在collection
增加更多的航线,而不它变成复数?
谢谢!
你想'资源:contact_informations',不'资源:contact_informations' ..你确定吗?有了“资源”,它总是会是_plural_。 –
嗯,我所知道的是,如果我写'资源:contact_informations',它会给''rake routes'中的'new_contact_information'' – ForgetfulFellow