aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2005-07-04 18:30:22 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2005-07-04 18:30:22 +0000
commite7b142aef7e9bbc81f725e221fe5de27e8d116b3 (patch)
treef260827c84a9f1a6dd1dc8e021c5830c7f70db76 /actionpack
parent5900d4ff75dbbdbe3baa0e6ac088b54a7eef34e4 (diff)
downloadrails-e7b142aef7e9bbc81f725e221fe5de27e8d116b3.tar.gz
rails-e7b142aef7e9bbc81f725e221fe5de27e8d116b3.tar.bz2
rails-e7b142aef7e9bbc81f725e221fe5de27e8d116b3.zip
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. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1670 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_controller/cgi_process.rb11
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