Wednesday, August 17, 2011

[Rails] Re: request.post? returns false on POST request

render :text => request.method # --> 'POST'

and yet
render :text => request.post? # --> false

rails 3.0.9


On Aug 17, 9:11 pm, 7stud -- <li...@ruby-forum.com> wrote:
> Hassan Schroeder wrote in post #1017170:
>
> > On Wed, Aug 17, 2011 at 8:42 AM, art <arte...@gmail.com> wrote:
>
> >> when i post with a form to this page - goes into else branch, when
> >> trying to output request.post? - it's false
>
> > Are you sure you're not actually doing a PUT via hidden form fields?
>
> Try this:
>
> def test
>
>     render :text => request.method
>
> end
>
> --
> Posted viahttp://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


Real Estate