diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2014-01-30 01:12:23 -0500 |
---|---|---|
committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2014-01-30 01:53:19 -0500 |
commit | fd487860db3097104cdb8d589f3931d75b767721 (patch) | |
tree | 4430a718660e01bd50556e93a270da8f82c28a2c /railties | |
parent | db5d6bf74f3f6423e56120198685b8665e59616e (diff) | |
download | rails-fd487860db3097104cdb8d589f3931d75b767721.tar.gz rails-fd487860db3097104cdb8d589f3931d75b767721.tar.bz2 rails-fd487860db3097104cdb8d589f3931d75b767721.zip |
Modify the session serializer implementation
Rename allowed options to :marshal and :json, for custom serializers
only allow the use of custom classes.
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/config/initializers/session_store.rb.tt | 2 | ||||
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/config/initializers/session_store.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/initializers/session_store.rb.tt index 923d423287..097fcb4bb0 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/initializers/session_store.rb.tt +++ b/railties/lib/rails/generators/rails/app/templates/config/initializers/session_store.rb.tt @@ -1,3 +1,3 @@ # Be sure to restart your server when you modify this file. -Rails.application.config.session_store :cookie_store, key: <%= "'_#{app_name}_session'" %>, serializer: :json_serializer +Rails.application.config.session_store :cookie_store, key: <%= "'_#{app_name}_session'" %>, serializer: :json diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 8aa306c8e0..700935fd8d 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -433,7 +433,7 @@ class AppGeneratorTest < Rails::Generators::TestCase def test_new_hash_style run_generator [destination_root] assert_file "config/initializers/session_store.rb" do |file| - assert_match(/config.session_store :cookie_store, key: '_.+_session', serializer: :json_serializer/, file) + assert_match(/config.session_store :cookie_store, key: '_.+_session', serializer: :json/, file) end end |