diff options
author | Xavier Noria <fxn@hashref.com> | 2016-08-06 19:35:13 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2016-08-06 19:35:13 +0200 |
commit | 5b6eb1d58b48fada298215b2cccda89f993890c3 (patch) | |
tree | a48010fd8c35588540f50df257a76347091aca12 /actionpack/test/controller/mime | |
parent | 12a70404cd164008879e63cc320356e6afee3adc (diff) | |
download | rails-5b6eb1d58b48fada298215b2cccda89f993890c3.tar.gz rails-5b6eb1d58b48fada298215b2cccda89f993890c3.tar.bz2 rails-5b6eb1d58b48fada298215b2cccda89f993890c3.zip |
modernizes hash syntax in actionpack
Diffstat (limited to 'actionpack/test/controller/mime')
-rw-r--r-- | actionpack/test/controller/mime/respond_to_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/test/controller/mime/respond_to_test.rb b/actionpack/test/controller/mime/respond_to_test.rb index ef2d89e1c0..385158b17c 100644 --- a/actionpack/test/controller/mime/respond_to_test.rb +++ b/actionpack/test/controller/mime/respond_to_test.rb @@ -46,7 +46,7 @@ class RespondToController < ActionController::Base def json_xml_or_html respond_to do |type| type.json { render body: "JSON" } - type.xml { render :xml => "XML" } + type.xml { render xml: "XML" } type.html { render body: "HTML" } end end @@ -146,7 +146,7 @@ class RespondToController < ActionController::Base def json_with_callback respond_to do |type| - type.json { render :json => "JS", :callback => "alert" } + type.json { render json: "JS", callback: "alert" } end end @@ -163,8 +163,8 @@ class RespondToController < ActionController::Base request.format = "iphone" if request.env["HTTP_ACCEPT"] == "text/iphone" respond_to do |type| - type.html { @type = "Firefox"; render :action => "iphone_with_html_response_type" } - type.iphone { @type = "iPhone" ; render :action => "iphone_with_html_response_type" } + type.html { @type = "Firefox"; render action: "iphone_with_html_response_type" } + type.iphone { @type = "iPhone" ; render action: "iphone_with_html_response_type" } end end |