Solved

request.raw_post

Posted on 2008-10-06
2
911 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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Assigning profile resource to users 4 316
in ruby, how can I call notepad ? 4 543
require 'icalendar' causes error 1 470
How chef gets upgraded automatically? 1 529
In Ruby, Call or invoke a API DLL library is easily via Win32API class, win32-api gem or other gems. For general DLL API call, there are quite a few references, some good tips list below: http://www.rubytips.org/2008/05/13/accessing-windows-api-fro…
Recently I spent hours debugging an issue in a Rails project where ActiveRecord was causing MySQL errors trying to create a User object of a class at the top level of a Single Table Inheritance model structure.  It turns out `.create` behaves differ…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

831 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