Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 5838

Show
Ignore:
Timestamp:
01/04/07 21:43:24 (2 years ago)
Author:
rick
Message:

rollback [5833] and [5835]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/CHANGELOG

    r5835 r5838  
    11*SVN* 
    2  
    3 * Allow ActionController::Base.session_store and #fragment_cache_store to lazily load the session class to allow for custom session store plugins.  [Rick Olson] 
    42 
    53* Make sure html_document is reset between integration test requests. [ctm] 
  • trunk/actionpack/lib/action_controller/caching.rb

    r5835 r5838  
    308308        base.class_eval do 
    309309          @@fragment_cache_store = MemoryStore.new 
    310           cattr_writer :fragment_cache_store 
    311  
    312           def self.fragment_cache_store 
    313             @@fragment_cache_store = if @@fragment_cache_store.is_a?(Array
    314               store, *parameters = *([ @@fragment_cache_store ].flatten
     310          cattr_reader :fragment_cache_store 
     311 
     312          def self.fragment_cache_store=(store_option) 
     313            store, *parameters = *([ store_option ].flatten
     314            @@fragment_cache_store = if store.is_a?(Symbol
    315315              store_class_name = (store == :drb_store ? "DRbStore" : store.to_s.camelize) 
    316316              store_class = ActionController::Caching::Fragments.const_get(store_class_name) 
    317317              store_class.new(*parameters) 
    318318            else 
    319               @@fragment_cache_store 
     319              store 
    320320            end 
    321321          end 
  • trunk/actionpack/lib/action_controller/session_management.rb

    r5833 r5838  
    1919      # :mem_cache_store, or :memory_store) or use your own class. 
    2020      def session_store=(store) 
    21         ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager] = store 
     21        ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager] = 
     22          store.is_a?(Symbol) ? CGI::Session.const_get(store == :drb_store ? "DRbStore" : store.to_s.camelize) : store 
    2223      end 
    2324 
    2425      # Returns the session store class currently used. 
    2526      def session_store 
    26         store = ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager] 
    27         self.session_store = store.is_a?(Symbol) ? CGI::Session.const_get(store == :drb_store ? "DRbStore" : store.to_s.camelize) : store 
     27        ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager] 
    2828      end 
    2929