Permalink
Browse files

apply [5833] to 1.2 RC branch

git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/1-2-pre-release@5834 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent c26cca3 commit 622d70a11eb3e110682803509822e2bfb8a9d8bb @technoweenie technoweenie committed Jan 4, 2007
Showing with 5 additions and 3 deletions.
  1. +2 −0 actionpack/CHANGELOG
  2. +3 −3 actionpack/lib/action_controller/session_management.rb
View
@@ -1,5 +1,7 @@
*1.13.0 RC2*
+* Allow ActionController::Base.session_store to lazily load the session class to allow for custom session store plugins. [Rick Olson]
+
* Make sure html_document is reset between integration test requests. [ctm]
* Set session to an empty hash if :new_session => false and no session cookie or param is present. CGI::Session was raising an unrescued ArgumentError. [Josh Susser]
@@ -18,13 +18,13 @@ module ClassMethods
# 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:

0 comments on commit 622d70a

Please sign in to comment.