aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/action_controller_overview.md
diff options
context:
space:
mode:
authorGodfrey Chan <godfreykfc@gmail.com>2014-01-30 00:24:28 -0800
committerGodfrey Chan <godfreykfc@gmail.com>2014-01-30 00:24:28 -0800
commit1917293dae366d5d6028da351460c8bccf22d21f (patch)
tree4430a718660e01bd50556e93a270da8f82c28a2c /guides/source/action_controller_overview.md
parentdb5d6bf74f3f6423e56120198685b8665e59616e (diff)
parentfd487860db3097104cdb8d589f3931d75b767721 (diff)
downloadrails-1917293dae366d5d6028da351460c8bccf22d21f.tar.gz
rails-1917293dae366d5d6028da351460c8bccf22d21f.tar.bz2
rails-1917293dae366d5d6028da351460c8bccf22d21f.zip
Merge pull request #13888 from rails/session-serializer
Modify the session serializer implementation
Diffstat (limited to 'guides/source/action_controller_overview.md')
-rw-r--r--guides/source/action_controller_overview.md16
1 files changed, 5 insertions, 11 deletions
diff --git a/guides/source/action_controller_overview.md b/guides/source/action_controller_overview.md
index 6c82375ea1..9eaf03dd82 100644
--- a/guides/source/action_controller_overview.md
+++ b/guides/source/action_controller_overview.md
@@ -384,20 +384,14 @@ YourApp::Application.config.session_store :cookie_store, key: '_your_app_session
You can pass `:serializer` key to specify serializer for serializing session:
```ruby
-YourApp::Application.config.session_store :cookie_store, key: '_your_app_session', serializer: :json_serializer
+YourApp::Application.config.session_store :cookie_store, key: '_your_app_session', serializer: :json
```
-Default serializer is `:marshal_serializer`. When Symbol or String is passed it
-will look for appropriate class in `ActionDispatch::Session` namespace, so
-passing `:my_custom_serializer` would load
-`ActionDispatch::Session::MyCustomSerializer`.
+The default serializer for new application is `:json`. For compatibility with
+old applications `:marshal` is used when `serializer` option is not specified.
-```ruby
-YourApp::Application.config.session_store :cookie_store, key: '_your_app_session', serializer: :my_custom_serializer
-```
-
-It is also possible to pass serializer object with defined `load` and `dump`
-public methods:
+It is also possible to pass a custom serializer class with `load` and `dump`
+public methods defined:
```ruby
YourApp::Application.config.session_store :cookie_store, key: '_your_app_session', serializer: MyCustomSerializer