aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorGustavo Delfino <gdelfino@mac.com>2013-06-09 08:39:09 -0430
committerGustavo Delfino <gdelfino@mac.com>2013-06-24 17:57:15 -0430
commitb437502f8bbef266e1e931ce7802c060e0ae75dd (patch)
tree6cdf2f7535b39f6bc7a5747f3f7483b4b83a69a8 /guides
parent059f9f03941a65baf400b4444e7eddd999397f94 (diff)
downloadrails-b437502f8bbef266e1e931ce7802c060e0ae75dd.tar.gz
rails-b437502f8bbef266e1e931ce7802c060e0ae75dd.tar.bz2
rails-b437502f8bbef266e1e931ce7802c060e0ae75dd.zip
Mention Content-Type for JSON params parsing.
http://stackoverflow.com/questions/8501021/rails-json-request-is-not-parsed-correctly-into-post-parameters
Diffstat (limited to 'guides')
-rw-r--r--guides/source/action_controller_overview.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/action_controller_overview.md b/guides/source/action_controller_overview.md
index 2701f5bb72..6a91418e1f 100644
--- a/guides/source/action_controller_overview.md
+++ b/guides/source/action_controller_overview.md
@@ -129,7 +129,7 @@ Note that the `params` hash is actually an instance of `ActiveSupport::HashWithI
### JSON parameters
-If you're writing a web service application, you might find yourself more comfortable accepting parameters in JSON format. Rails will automatically convert your parameters into the `params` hash, which you can access as you would normally.
+If you're writing a web service application, you might find yourself more comfortable accepting parameters in JSON format. If the "Content-Type" header of your request is set to "application/json", Rails will automatically convert your parameters into the `params` hash, which you can access as you would normally.
So for example, if you are sending this JSON content: