Solved

request.raw_post

Posted on 2008-10-06
2
913 Views
Last Modified: 2013-11-13
Hi, this is the last post on this AJAX example  http://www.railshosting.org/#live_searching  - thanks rails gurus.

What exactly does the request.raw_post value give you?  I can't seem to find any documentation on it (probably looking in the wrong place).  The docs and wikis I've seen seem to imply that you would say something like

with => 'myVal=' + encodeURI .........

and then access params[:myVal] in the controller.  What does the raw_post value contain?  Does it just default to the value of the control your observing?  Any disadvantages to using it?

Thanks!

A
0
Comment
Question by:ARACK04
2 Comments
 
LVL 14

Accepted Solution

by:
wesgarrison earned 500 total points
ID: 22652801
If you want to see the value of something, just raise it:
raise request.raw_post.inspect

Or, log it:
logger.debug request.raw_post

That said, the Rails documentation link for raw_post is here:
http://api.rubyonrails.com/classes/ActionController/AbstractRequest.html#M000818

I normally do the :with because I like to name the parameter, so I'm not exactly sure what raw_post contains.
0
 

Author Comment

by:ARACK04
ID: 22652952
Great, thanks!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I recently rediscovered rails when I needed a holiday project and decided to build a management dashboard for the company where I work.  With it being a project done in my free time, I could focus my time on learning the basics rather than trying to…
Article by: narshlob
If you've ever programmed in Ruby and have come across either a proc or a lambda, you might have been wondering what the difference is between the two and when you would use one over the other. This article will try to explain the difference between…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question