I have a form that’s stopped working. It calls a PUT action - the route
is defined thus (other routes omitted for clarity):
map.namespace :admin do |admin|
admin.resources :resources, :member => { :update_bundle => :put }
end
And it shows up in rake routes as
update_bundle_admin_resource PUT
/admin/resources/:id/update_bundle
{:action=>“update_bundle”, :controller=>“admin/resources”}
So far so good. The problem seems to be with my form - i can’t get it
to make a put request. Initially it was like this:
Looking in my logs, it’s generating this request:
Processing ResourcesController#4557 (for 127.0.0.1 at 2008-10-10
10:22:44) [GET]
Parameters: {“action”=>“4557”, “id”=>“update_bundle”,
“controller”=>“admin/resources”}
I tried changing it to a form_tag (which should just generate the same
html as i already have):
<% form_tag update_bundle_admin_resource_path(@resource), :method =>
:put do -%>
But i get the same result. Can anyone see if i’m doing something wrong?
Like i said, this used to work fine, but we just did a big
branch-swapping deploy and maybe something somewhere is screwing it up.
I have no idea what though.
thanks, max