views:

40

answers:

0

Trying to route:

scope :shortcut do
 resources :text_elems
end

Using basic scaffold with form partial

*_form.html.erb*
<%= form_for(@text_elem, :shortcut => @shortcut) do |f| %> 
...

Problem is: When I call the edit action, the form html shows as:

<form ... action="/25/text_elems/25">

Note: The new action renders the form action correctly:

<form ... action="/home/text_elems">

So it appears that my :shortcut param is getting trumped by the :id param when form_for processes it's block. Now I am able to get the action to correctly route with the :shortcut param if I manually make the :url => {...} in the form_for block, but I would prefer to keep the code dry, plus I want to report this problem to rails if it is indeed a bug.

Can anyone else confirm this as a bug?