mirror of https://github.com/rails/rails
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
This commit is contained in:
parent
5900d4ff75
commit
e7b142aef7
|
@ -2,8 +2,10 @@ require 'action_controller/cgi_ext/cgi_ext'
|
||||||
require 'action_controller/cgi_ext/cookie_performance_fix'
|
require 'action_controller/cgi_ext/cookie_performance_fix'
|
||||||
require 'action_controller/cgi_ext/raw_post_data_fix'
|
require 'action_controller/cgi_ext/raw_post_data_fix'
|
||||||
require 'action_controller/session/drb_store'
|
require 'action_controller/session/drb_store'
|
||||||
require 'action_controller/session/active_record_store'
|
|
||||||
require 'action_controller/session/mem_cache_store'
|
require 'action_controller/session/mem_cache_store'
|
||||||
|
if Object.const_defined?(:ActiveRecord)
|
||||||
|
require 'action_controller/session/active_record_store'
|
||||||
|
end
|
||||||
|
|
||||||
module ActionController #:nodoc:
|
module ActionController #:nodoc:
|
||||||
class Base
|
class Base
|
||||||
|
@ -37,8 +39,11 @@ module ActionController #:nodoc:
|
||||||
class CgiRequest < AbstractRequest #:nodoc:
|
class CgiRequest < AbstractRequest #:nodoc:
|
||||||
attr_accessor :cgi
|
attr_accessor :cgi
|
||||||
|
|
||||||
DEFAULT_SESSION_OPTIONS =
|
DEFAULT_SESSION_OPTIONS = {
|
||||||
{ :database_manager => CGI::Session::PStore, :prefix => "ruby_sess.", :session_path => "/" }
|
:database_manager => CGI::Session::PStore,
|
||||||
|
:prefix => "ruby_sess.",
|
||||||
|
:session_path => "/"
|
||||||
|
} unless const_defined?(:DEFAULT_SESSION_OPTIONS)
|
||||||
|
|
||||||
def initialize(cgi, session_options = {})
|
def initialize(cgi, session_options = {})
|
||||||
@cgi = cgi
|
@cgi = cgi
|
||||||
|
|
Loading…
Reference in New Issue