aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/upgrading_ruby_on_rails.md
diff options
context:
space:
mode:
authorAgis Anastasopoulos <corestudiosinc@gmail.com>2012-11-16 21:11:34 +0200
committerAgis Anastasopoulos <corestudiosinc@gmail.com>2012-11-16 21:11:34 +0200
commitd0767ceb005932e5adfad11f72d17b6d74d47787 (patch)
tree2c511f2a221857edc08cd33691ff11d509a05da3 /guides/source/upgrading_ruby_on_rails.md
parente258225c8a7505fec300d89a63ab8c593ef4cdbf (diff)
downloadrails-d0767ceb005932e5adfad11f72d17b6d74d47787.tar.gz
rails-d0767ceb005932e5adfad11f72d17b6d74d47787.tar.bz2
rails-d0767ceb005932e5adfad11f72d17b6d74d47787.zip
Switch to 1.9 hash syntax (guides)
Diffstat (limited to 'guides/source/upgrading_ruby_on_rails.md')
-rw-r--r--guides/source/upgrading_ruby_on_rails.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md
index 05a1714966..6fb10693ff 100644
--- a/guides/source/upgrading_ruby_on_rails.md
+++ b/guides/source/upgrading_ruby_on_rails.md
@@ -83,13 +83,13 @@ Rails 4.0 changed how `assert_generates`, `assert_recognizes`, and `assert_routi
Rails 4.0 also changed the way unicode character routes are drawn. Now you can draw unicode character routes directly. If you already draw such routes, you must change them, for example:
```ruby
-get Rack::Utils.escape('こんにちは'), :controller => 'welcome', :action => 'index'
+get Rack::Utils.escape('こんにちは'), controller: 'welcome', action: 'index'
```
becomes
```ruby
-get 'こんにちは', :controller => 'welcome', :action => 'index'
+get 'こんにちは', controller: 'welcome', action: 'index'
```
### Active Support
@@ -248,7 +248,7 @@ Add this file with the following contents, if you wish to wrap parameters into a
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
ActiveSupport.on_load(:action_controller) do
- wrap_parameters :format => [:json]
+ wrap_parameters format: [:json]
end
# Disable root element in JSON by default.
@@ -263,7 +263,7 @@ You need to change your session key to something new, or remove all sessions:
```ruby
# in config/initializers/session_store.rb
-AppName::Application.config.session_store :cookie_store, :key => 'SOMETHINGNEW'
+AppName::Application.config.session_store :cookie_store, key: 'SOMETHINGNEW'
```
or