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

Changeset 5833

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

Allow ActionController::Base.session_store to lazily load the session class to allow for custom session store plugins. [Rick Olson]

Files:

Legend:

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

    r5828 r5833  
    11*SVN* 
     2 
     3* Allow ActionController::Base.session_store to lazily load the session class to allow for custom session store plugins.  [Rick Olson] 
    24 
    35* Make sure html_document is reset between integration test requests. [ctm] 
  • trunk/actionpack/lib/action_controller/session_management.rb

    r5512 r5833  
    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] = 
    22           store.is_a?(Symbol) ? CGI::Session.const_get(store == :drb_store ? "DRbStore" : store.to_s.camelize) : store 
     21        ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager] = store 
    2322      end 
    2423 
    2524      # Returns the session store class currently used. 
    2625      def session_store 
    27         ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager] 
     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 
    2828      end 
    2929