diff options
author | Godfrey Chan <godfreykfc@gmail.com> | 2014-01-30 00:24:28 -0800 |
---|---|---|
committer | Godfrey Chan <godfreykfc@gmail.com> | 2014-01-30 00:24:28 -0800 |
commit | 1917293dae366d5d6028da351460c8bccf22d21f (patch) | |
tree | 4430a718660e01bd50556e93a270da8f82c28a2c /actionpack/lib/action_dispatch | |
parent | db5d6bf74f3f6423e56120198685b8665e59616e (diff) | |
parent | fd487860db3097104cdb8d589f3931d75b767721 (diff) | |
download | rails-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 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/cookies.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/cookies.rb b/actionpack/lib/action_dispatch/middleware/cookies.rb index f9f034952e..23d0ecd529 100644 --- a/actionpack/lib/action_dispatch/middleware/cookies.rb +++ b/actionpack/lib/action_dispatch/middleware/cookies.rb @@ -466,10 +466,12 @@ module ActionDispatch end def serializer - serializer = @options[:session_serializer] || :marshal_serializer + serializer = @options[:session_serializer] || :marshal case serializer - when Symbol, String - ActionDispatch::Session.const_get(serializer.to_s.camelize) + when :marshal + ActionDispatch::Session::MarshalSerializer + when :json + ActionDispatch::Session::JsonSerializer else serializer end |