diff options
author | Prem Sichanugrist <s@sikachu.com> | 2012-08-15 01:22:50 -0400 |
---|---|---|
committer | Prem Sichanugrist <s@sikachu.com> | 2012-08-24 15:24:19 -0400 |
commit | 0ffe19056c8e8b2f9ae9d487b896cad2ce9387ad (patch) | |
tree | 8308e637c41e0f0bed0ffdb6b1fe96b741825f53 /guides | |
parent | 2c571b3f0544a6457db4818e752f4cd4bacd48b4 (diff) | |
download | rails-0ffe19056c8e8b2f9ae9d487b896cad2ce9387ad.tar.gz rails-0ffe19056c8e8b2f9ae9d487b896cad2ce9387ad.tar.bz2 rails-0ffe19056c8e8b2f9ae9d487b896cad2ce9387ad.zip |
Extract ActiveRecord::SessionStore from Rails
This functionality will be available from gem
`active_record-session_store` instead.
Diffstat (limited to 'guides')
-rw-r--r-- | guides/code/getting_started/config/initializers/session_store.rb | 5 | ||||
-rw-r--r-- | guides/source/active_support_core_extensions.textile | 10 |
2 files changed, 3 insertions, 12 deletions
diff --git a/guides/code/getting_started/config/initializers/session_store.rb b/guides/code/getting_started/config/initializers/session_store.rb index 1a67af58b5..3b2ca93ab9 100644 --- a/guides/code/getting_started/config/initializers/session_store.rb +++ b/guides/code/getting_started/config/initializers/session_store.rb @@ -1,8 +1,3 @@ # Be sure to restart your server when you modify this file. Blog::Application.config.session_store :cookie_store, key: '_blog_session' - -# Use the database for sessions instead of the cookie-based default, -# which shouldn't be used to store highly confidential information -# (create the session table with "rails generate session_migration") -# Blog::Application.config.session_store :active_record_store diff --git a/guides/source/active_support_core_extensions.textile b/guides/source/active_support_core_extensions.textile index 109228f8c7..8748817eb8 100644 --- a/guides/source/active_support_core_extensions.textile +++ b/guides/source/active_support_core_extensions.textile @@ -1491,13 +1491,9 @@ For example, Action Pack uses this method to load the class that provides a cert <ruby> # action_controller/metal/session_management.rb def session_store=(store) - if store == :active_record_store - self.session_store = ActiveRecord::SessionStore - else - @@session_store = store.is_a?(Symbol) ? - ActionDispatch::Session.const_get(store.to_s.camelize) : - store - end + @@session_store = store.is_a?(Symbol) ? + ActionDispatch::Session.const_get(store.to_s.camelize) : + store end </ruby> |