diff options
author | Rick Olson <technoweenie@gmail.com> | 2007-01-04 21:43:24 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2007-01-04 21:43:24 +0000 |
commit | 8219db5ee25342ae53bfdcc511b00058121ebb42 (patch) | |
tree | 494c54bce8f7446f066afea2675425233342fdfa /actionpack/lib/action_controller | |
parent | 1023bc6e8622e2d5c2683764d25f543d5e79a926 (diff) | |
download | rails-8219db5ee25342ae53bfdcc511b00058121ebb42.tar.gz rails-8219db5ee25342ae53bfdcc511b00058121ebb42.tar.bz2 rails-8219db5ee25342ae53bfdcc511b00058121ebb42.zip |
rollback [5833] and [5835]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5838 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/caching.rb | 10 | ||||
-rw-r--r-- | actionpack/lib/action_controller/session_management.rb | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb index 39c57206e7..c7f3e95617 100644 --- a/actionpack/lib/action_controller/caching.rb +++ b/actionpack/lib/action_controller/caching.rb @@ -307,16 +307,16 @@ module ActionController #:nodoc: def self.included(base) #:nodoc: base.class_eval do @@fragment_cache_store = MemoryStore.new - cattr_writer :fragment_cache_store + cattr_reader :fragment_cache_store - def self.fragment_cache_store - @@fragment_cache_store = if @@fragment_cache_store.is_a?(Array) - store, *parameters = *([ @@fragment_cache_store ].flatten) + def self.fragment_cache_store=(store_option) + store, *parameters = *([ store_option ].flatten) + @@fragment_cache_store = if store.is_a?(Symbol) store_class_name = (store == :drb_store ? "DRbStore" : store.to_s.camelize) store_class = ActionController::Caching::Fragments.const_get(store_class_name) store_class.new(*parameters) else - @@fragment_cache_store + store end end end diff --git a/actionpack/lib/action_controller/session_management.rb b/actionpack/lib/action_controller/session_management.rb index 95c5ea7336..60b0cd5f94 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 + ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager] = + store.is_a?(Symbol) ? CGI::Session.const_get(store == :drb_store ? "DRbStore" : store.to_s.camelize) : store end # Returns the session store class currently used. def session_store - 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 + ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager] end # Returns the hash used to configure the session. Example use: |