aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/session_management.rb
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2007-01-04 21:18:13 +0000
committerRick Olson <technoweenie@gmail.com>2007-01-04 21:18:13 +0000
commit05aa57bc8439d5fa769cb8a486233c455f93857c (patch)
tree7291cfc42efe56dbbac0925bb09fd314762ea32f /actionpack/lib/action_controller/session_management.rb
parent1af2022cc32b604529a5ac3a85a3bd92a3c42936 (diff)
downloadrails-05aa57bc8439d5fa769cb8a486233c455f93857c.tar.gz
rails-05aa57bc8439d5fa769cb8a486233c455f93857c.tar.bz2
rails-05aa57bc8439d5fa769cb8a486233c455f93857c.zip
Allow ActionController::Base.session_store to lazily load the session class to allow for custom session store plugins. [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5833 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/session_management.rb')
-rw-r--r--actionpack/lib/action_controller/session_management.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/session_management.rb b/actionpack/lib/action_controller/session_management.rb
index 60b0cd5f94..95c5ea7336 100644
--- a/actionpack/lib/action_controller/session_management.rb
+++ b/actionpack/lib/action_controller/session_management.rb
@@ -18,13 +18,13 @@ module ActionController #:nodoc:
# file system, but you can also specify one of the other included stores (:active_record_store, :drb_store,
# :mem_cache_store, or :memory_store) or use your own class.
def session_store=(store)
- ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager] =
- store.is_a?(Symbol) ? CGI::Session.const_get(store == :drb_store ? "DRbStore" : store.to_s.camelize) : store
+ ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager] = store
end
# Returns the session store class currently used.
def session_store
- ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager]
+ store = ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager]
+ self.session_store = store.is_a?(Symbol) ? CGI::Session.const_get(store == :drb_store ? "DRbStore" : store.to_s.camelize) : store
end
# Returns the hash used to configure the session. Example use: