aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2015-09-19 00:11:18 +0200
committerKasper Timm Hansen <kaspth@gmail.com>2016-01-04 23:07:34 +0100
commit52bb2d36d3141dcd8217221065d9b5fa2b12deba (patch)
tree806f79dd361e1bb2a881dd628dcbfc7df82d5d1d /actionpack/lib/action_dispatch/routing
parent904e3f4465cb2b874bd99000e96e2e6e0e03844c (diff)
downloadrails-52bb2d36d3141dcd8217221065d9b5fa2b12deba.tar.gz
rails-52bb2d36d3141dcd8217221065d9b5fa2b12deba.tar.bz2
rails-52bb2d36d3141dcd8217221065d9b5fa2b12deba.zip
Add `as` to encode a request as a specific mime type.
Turns ``` post articles_path(format: :json), params: { article: { name: 'Ahoy!' } }.to_json, headers: { 'Content-Type' => 'application/json' } ``` into ``` post articles_path, params: { article: { name: 'Ahoy!' } }, as: :json ```
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
0 files changed, 0 insertions, 0 deletions