diff options
Diffstat (limited to 'guides/source/upgrading_ruby_on_rails.md')
-rw-r--r-- | guides/source/upgrading_ruby_on_rails.md | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md index 05a1714966..bf81776006 100644 --- a/guides/source/upgrading_ruby_on_rails.md +++ b/guides/source/upgrading_ruby_on_rails.md @@ -69,6 +69,8 @@ in the `config/initializers/wrap_parameters.rb` file: ### Action Pack +There is an upgrading cookie store UpgradeSignatureToEncryptionCookieStore which helps you upgrading apps that use +CookieStore+ to the new default +EncryptedCookieStore+. To use this CookieStore set Myapp::Application.config.session_store :upgrade_signature_to_encryption_cookie_store, key: '_myapp_session' in your config/initializers/session_store.rb. You will also need to add Myapp::Application.config.secret_key_base = 'some secret' in your config/initializers/secret_token.rb, but do not remove +Myapp::Application.config.secret_token = 'some secret'+ + Rails 4.0 removed the `ActionController::Base.asset_path` option. Use the assets pipeline feature. Rails 4.0 has deprecated `ActionController::Base.page_cache_extension` option. Use @@ -83,13 +85,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 +250,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 +265,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 |