# PUT recognized as GET

**URL:** <https://www.ruby-forum.com/t/put-recognized-as-get/104578>\
**Category:** Rails\
**Created:** [May 19, 2007, 9:07pm UTC](https://www.ruby-forum.com/t/put-recognized-as-get/104578 "2007-05-19T21:07:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gazoduc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/c5a1d2/32.png) [@gazoduc](https://www.ruby-forum.com/u/gazoduc)\
**Post date:** [May 19, 2007, 9:07pm UTC](https://www.ruby-forum.com/t/put-recognized-as-get/104578/1 "2007-05-19T21:07:40Z")

</div>

I am getting mad. Here are two requests which should be PUT, but one is  
and not the other. I do not understand why. They come from two different  
forms.

Processing NodesController#show (for …) [GET]  
Session ID: …  
Parameters: {“node”=\>{…}, “\_method”=\>“put”, “action”=\>“show”,  
“id”=\>“251”, “controller”=\>“nodes”}

Processing NodesController#update (for …) [PUT]  
Session ID: …  
Parameters: {“node”=\>{…}, “edit”=\>“popup”, “\_method”=\>“put”,  
“action”=\>“update”, “id”=\>“251”, “controller”=\>“nodes”}

Any clue before I jump into the raw\_data ?

---

<div class="post-metadata">

**Author:** ![gazoduc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/c5a1d2/32.png) [@gazoduc](https://www.ruby-forum.com/u/gazoduc)\
**Post date:** [May 19, 2007, 9:39pm UTC](https://www.ruby-forum.com/t/put-recognized-as-get/104578/2 "2007-05-19T21:39:19Z")

</div>

Are you on edge rails, by any chance? I’m seeing some weirdness  
introduced in the past couple of days, where ajax requests don’t seem  
to be having their method received correctly…

---

<div class="post-metadata">

**Author:** ![gazoduc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/c5a1d2/32.png) [@gazoduc](https://www.ruby-forum.com/u/gazoduc)\
**Post date:** [May 19, 2007, 9:27pm UTC](https://www.ruby-forum.com/t/put-recognized-as-get/104578/3 "2007-05-19T21:27:38Z")

</div>

Gaspard B. wrote:

> I am getting mad. Here are two requests which should be PUT, but one is  
> and not the other. I do not understand why. They come from two different  
> forms.
> 
> Processing NodesController#show (for …) [GET]  
> Session ID: …  
> Parameters: {“node”=\>{…}, “\_method”=\>“put”, “action”=\>“show”,  
> “id”=\>“251”, “controller”=\>“nodes”}
> 
> Processing NodesController#update (for …) [PUT]  
> Session ID: …  
> Parameters: {“node”=\>{…}, “edit”=\>“popup”, “\_method”=\>“put”,  
> “action”=\>“update”, “id”=\>“251”, “controller”=\>“nodes”}
> 
> Any clue before I jump into the raw\_data ?

After searching in the raw\_data of the mongrel instance, I read  
“REQUEST\_METHOD”=\>“GET”, and _nasty me_ I saw that my form was :

 instead of .

Sorry for the trouble.

Gaspard

---

<div class="post-metadata">

**Author:** ![gazoduc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/c5a1d2/32.png) [@gazoduc](https://www.ruby-forum.com/u/gazoduc)\
**Post date:** [May 19, 2007, 10:25pm UTC](https://www.ruby-forum.com/t/put-recognized-as-get/104578/4 "2007-05-19T22:25:33Z")

</div>

Jonathan del Strother wrote:

> Are you on edge rails, by any chance? I’m seeing some weirdness  
> introduced in the past couple of days, where ajax requests don’t seem  
> to be having their method received correctly…

My error was related to a form tag missing the method=‘post’ attribute.  
I am doing a LOT of cleanup and froze rails to rev. 6633 so I can track  
my own bugs. I will catchup when my own code is stable.

You can look at the commit feed  
feed://dev.rubyonrails.org/timeline?changeset=on&max=50&daysback=90&format=rss  
to see if anything changed related to your bugs…

Gaspard

* * *

zena, the peaceful cms

> **[Zenadmin - Tech admin](http://zenadmin.org)**
>
> Tech admin
