2
哈希參數
查詢:如何接受路線
我有一個像
<%= link_to "link_name", :controller => "some_controller", :action =>
"some_action", :id => "some_id", :first_param => {:second_param => "some
value"} %>
,並在我的routes.rb
map.connect '/some_name/:id' :controller => "some_controller", :action
=> "some_action"
上面代碼的鏈接是給了我一個網址像
http://localhost:3000/some_name/some_id
我的要求是構造th e URL爲:
http://localhost:3000/some_name/some_id/value_inside_params[:first_param][:second_param]
請幫我一把。
感謝,
SAURABH
它正在爲params [:other]工作,但我想要一個網址爲params [:other] [:first] – user358176 2010-07-24 10:02:46