【Ruby】Ruby on Rail ..
[2ch|▼Menu]
531:nobodyさん
10/05/24 17:38:15
Intentory::Item というリソースがあって、config/routes.rb に

map.inventory do |x|
 x.resources :items
 x.ship_inventory_item '/items/:id/ship', :controller=>'items', :action=>'ship', :conditions=>{:method=>:put}
end

のように書いたら、

inventory_items()
inventory_item()
new_inventory_items()
edit_inventory_item()
inventory_ship_inventory_item()

というnamed routesが定義されました。
ここで、最後の inventory_ship_inventory_item() を他と同じように ship_inventory_item() としたいのですが、どうしたらいいでしょうか。
よろしくお願いします。



次ページ
続きを表示
1を表示
最新レス表示
スレッドの検索
類似スレ一覧
話題のニュース
おまかせリスト
▼オプションを表示
暇つぶし2ch

4916日前に更新/201 KB
担当:undef