Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Mention Content-Type for JSON params parsing.

  • Loading branch information...
commit b437502f8bbef266e1e931ce7802c060e0ae75dd 1 parent 059f9f0
@gdelfino gdelfino authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  guides/source/action_controller_overview.md
View
2  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:
Please sign in to comment.
Something went wrong with that request. Please try again.