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

Changeset 1670

Show
Ignore:
Timestamp:
07/04/05 18:30:22 (3 years ago)
Author:
bitsweat
Message:

r2789@asus: jeremy | 2005-07-04 16:17:35 -0700
require active_record_store only if ActiveRecord is already defined. define DEFAULT_SESSION_OPTIONS only if it is undefined.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/lib/action_controller/cgi_process.rb

    r1537 r1670  
    33require 'action_controller/cgi_ext/raw_post_data_fix' 
    44require 'action_controller/session/drb_store' 
    5 require 'action_controller/session/active_record_store' 
    65require 'action_controller/session/mem_cache_store' 
     6if Object.const_defined?(:ActiveRecord) 
     7  require 'action_controller/session/active_record_store' 
     8end 
    79 
    810module ActionController #:nodoc: 
     
    3840    attr_accessor :cgi 
    3941 
    40     DEFAULT_SESSION_OPTIONS = 
    41       { :database_manager => CGI::Session::PStore, :prefix => "ruby_sess.", :session_path => "/" } 
     42    DEFAULT_SESSION_OPTIONS = { 
     43      :database_manager => CGI::Session::PStore, 
     44      :prefix => "ruby_sess.", 
     45      :session_path => "/" 
     46    } unless const_defined?(:DEFAULT_SESSION_OPTIONS) 
    4247 
    4348    def initialize(cgi, session_options = {})