[Rails] Re: request.post? returns false on POST request
art wrote in post #1017180:
> render :text => request.method # --> 'POST'
>
> and yet
> render :text => request.post? # --> false
>
> rails 3.0.9
Okay. Web browser can't really send PUT or DELETE requests. So rails
fakes it by putting a hidden form field on the page with a value of
'put' or 'delete'. Then rails checks for that form field. I guess
request.method returns the actual type of the request that the browser
sent--not the type that rails fakes.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home