aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-09-13 07:48:12 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-09-13 07:48:12 +0000
commit48018bf4b5e5a2e173b4744abddc3e8cb590b4df (patch)
tree5d9117ee0318c38ae140a474b4bf27524f8f3964
parent53ee2c96337d16be9a86710d8179941d16895b98 (diff)
downloadrails-48018bf4b5e5a2e173b4744abddc3e8cb590b4df.tar.gz
rails-48018bf4b5e5a2e173b4744abddc3e8cb590b4df.tar.bz2
rails-48018bf4b5e5a2e173b4744abddc3e8cb590b4df.zip
Moved session options to SessionManagement
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2229 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rwxr-xr-xactionpack/lib/action_controller/base.rb20
-rw-r--r--actionpack/lib/action_controller/session_management.rb20
2 files changed, 20 insertions, 20 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb
index 0bfa261e7a..59160c3e81 100755
--- a/actionpack/lib/action_controller/base.rb
+++ b/actionpack/lib/action_controller/base.rb
@@ -346,26 +346,6 @@ module ActionController #:nodoc:
require 'action_controller/upload_progress'
include ActionController::UploadProgress
end
-
- # Set the session store to be used for keeping the session data between requests. The default is using the
- # file system, but you can also specify one of the other included stores (:active_record_store, :drb_store,
- # :mem_cache_store, or :memory_store) or use your own class.
- def session_store=(store)
- ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager] =
- store.is_a?(Symbol) ? CGI::Session.const_get(store.to_s.camelize) : store
- end
-
- # Returns the session store class currently used.
- def session_store
- ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager]
- end
-
- # Returns the hash used to configure the session. Example use:
- #
- # ActionController::Base.session_options[:session_secure] = true # session only available over HTTPS
- def session_options
- ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS
- end
end
public
diff --git a/actionpack/lib/action_controller/session_management.rb b/actionpack/lib/action_controller/session_management.rb
index e5c2258582..193910d470 100644
--- a/actionpack/lib/action_controller/session_management.rb
+++ b/actionpack/lib/action_controller/session_management.rb
@@ -10,6 +10,26 @@ module ActionController #:nodoc:
end
module ClassMethods
+ # Set the session store to be used for keeping the session data between requests. The default is using the
+ # file system, but you can also specify one of the other included stores (:active_record_store, :drb_store,
+ # :mem_cache_store, or :memory_store) or use your own class.
+ def session_store=(store)
+ ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager] =
+ store.is_a?(Symbol) ? CGI::Session.const_get(store.to_s.camelize) : store
+ end
+
+ # Returns the session store class currently used.
+ def session_store
+ ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager]
+ end
+
+ # Returns the hash used to configure the session. Example use:
+ #
+ # ActionController::Base.session_options[:session_secure] = true # session only available over HTTPS
+ def session_options
+ ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS
+ end
+
# Specify how sessions ought to be managed for a subset of the actions on
# the controller. Like filters, you can specify <tt>:only</tt> and
# <tt>:except</tt> clauses to restrict the subset, otherwise options