aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/mime
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-08-06 19:35:13 +0200
committerXavier Noria <fxn@hashref.com>2016-08-06 19:35:13 +0200
commit5b6eb1d58b48fada298215b2cccda89f993890c3 (patch)
treea48010fd8c35588540f50df257a76347091aca12 /actionpack/test/controller/mime
parent12a70404cd164008879e63cc320356e6afee3adc (diff)
downloadrails-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.rb8
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