diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2015-09-19 00:11:18 +0200 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2016-01-04 23:07:34 +0100 |
commit | 52bb2d36d3141dcd8217221065d9b5fa2b12deba (patch) | |
tree | 806f79dd361e1bb2a881dd628dcbfc7df82d5d1d /activerecord/test/support/ddl_helper.rb | |
parent | 904e3f4465cb2b874bd99000e96e2e6e0e03844c (diff) | |
download | rails-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 'activerecord/test/support/ddl_helper.rb')
0 files changed, 0 insertions, 0 deletions