# Form works with POST but not PUT

**URL:** <https://www.ruby-forum.com/t/form-works-with-post-but-not-put/150606>\
**Category:** Rails\
**Created:** [October 10, 2008, 11:31am UTC](https://www.ruby-forum.com/t/form-works-with-post-but-not-put/150606 "2008-10-10T11:31:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmaxvv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/85f322/32.png) [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Post date:** [October 10, 2008, 11:31am UTC](https://www.ruby-forum.com/t/form-works-with-post-but-not-put/150606/1 "2008-10-10T11:31:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cmaxvv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/85f322/32.png) [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Post date:** [October 10, 2008, 11:33am UTC](https://www.ruby-forum.com/t/form-works-with-post-but-not-put/150606/2 "2008-10-10T11:33:38Z")

</div>

Oh, and i forgot to mention - if i change it to use POST instead of PUT  
then everything works fine. But i’d rather find out why it’s breaking.
