我是一个新卜赛人,我一直在努力解决以下棘手问题:
我有一位出版商控制员,我想把它当作一种工具,这样一位挂牌照的出版商就可以利用出版/出版路线了解他的形象。
我的路线档案如下:
resources :publishers, :only => [:index, :show, :edit, :update]
resource :publisher, :only => [:show, :edit, :update]
我认为,控制者我有链接
<li><%= link_to "View General Settings", publishers_path(@publisher) %></li>
www.un.org/Depts/DGACM/index_spanish.htm 问题:链接翻译为URL/publisher.1
(而不是publisher/1
>
(publisher_id
;publisher_id
为2, 使之达到/publisher.2
www.un.org/Depts/DGACM/index_spanish.htm 任何建议为何发生,如何确定?
我在此列:
publishers GET /publishers(.:format) {:action=>"index", :controller=>"publishers"}
edit_publisher GET /publishers/:id/edit(.:format) {:action=>"edit", :controller=>"publishers"}
publisher GET /publishers/:id(.:format) {:action=>"show", :controller=>"publishers"}
PUT /publishers/:id(.:format) {:action=>"update", :controller=>"publishers"}
POST /publisher(.:format) {:action=>"create", :controller=>"publishers"}
new_publisher GET /publisher/new(.:format) {:action=>"new", :controller=>"publishers"}
GET /publisher/edit(.:format) {:action=>"edit", :controller=>"publishers"}
GET /publisher(.:format) {:action=>"show", :controller=>"publishers"}
PUT /publisher(.:format) {:action=>"update", :controller=>"publishers"}
感谢!