diff options
Diffstat (limited to 'actionpack/lib/action_controller/caching.rb')
-rw-r--r-- | actionpack/lib/action_controller/caching.rb | 10 |
1 files changed, 5 insertions, 5 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 |