diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_controller/cgi_process.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/cgi_process.rb b/actionpack/lib/action_controller/cgi_process.rb index 43a8a53b8b..be37fa6dd8 100644 --- a/actionpack/lib/action_controller/cgi_process.rb +++ b/actionpack/lib/action_controller/cgi_process.rb @@ -2,8 +2,10 @@ require 'action_controller/cgi_ext/cgi_ext' require 'action_controller/cgi_ext/cookie_performance_fix' require 'action_controller/cgi_ext/raw_post_data_fix' require 'action_controller/session/drb_store' -require 'action_controller/session/active_record_store' require 'action_controller/session/mem_cache_store' +if Object.const_defined?(:ActiveRecord) + require 'action_controller/session/active_record_store' +end module ActionController #:nodoc: class Base @@ -37,8 +39,11 @@ module ActionController #:nodoc: class CgiRequest < AbstractRequest #:nodoc: attr_accessor :cgi - DEFAULT_SESSION_OPTIONS = - { :database_manager => CGI::Session::PStore, :prefix => "ruby_sess.", :session_path => "/" } + DEFAULT_SESSION_OPTIONS = { + :database_manager => CGI::Session::PStore, + :prefix => "ruby_sess.", + :session_path => "/" + } unless const_defined?(:DEFAULT_SESSION_OPTIONS) def initialize(cgi, session_options = {}) @cgi = cgi |