aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-03-20 13:34:07 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-03-20 13:34:07 +0000
commit9c605227ec14ba4217d4a9396e9986af73fa522e (patch)
treea2951c8e1e06e9c3e99d521fb51a126bb96b1746 /actionpack/lib
parente2805207b71df948ed889ec9bac70b727bb0ffeb (diff)
downloadrails-9c605227ec14ba4217d4a9396e9986af73fa522e.tar.gz
rails-9c605227ec14ba4217d4a9396e9986af73fa522e.tar.bz2
rails-9c605227ec14ba4217d4a9396e9986af73fa522e.zip
Added a bit more to the session documentation on how to clear sessions
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@922 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rwxr-xr-xactionpack/lib/action_controller/base.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb
index 688ab7e174..8db1a476bf 100755
--- a/actionpack/lib/action_controller/base.rb
+++ b/actionpack/lib/action_controller/base.rb
@@ -96,16 +96,19 @@ module ActionController #:nodoc:
#
# You can place objects in the session by using the <tt>@session</tt> hash:
#
- # @session["person"] = Person.authenticate(user_name, password)
+ # @session[:person] = Person.authenticate(user_name, password)
#
# And retrieved again through the same hash:
#
- # Hello #{@session["person"]}
+ # Hello #{@session[:person]}
#
# Any object can be placed in the session (as long as it can be Marshalled). But remember that 1000 active sessions each storing a
# 50kb object could lead to a 50MB memory overhead. In other words, think carefully about size and caching before resorting to the use
# of the session.
#
+ # For removing objects from the session, you can either assign a single key to nil, like <tt>@session[:person] = nil</tt>, or you can
+ # remove the entire session with reset_session.
+ #
# == Responses
#
# Each action results in a response, which holds the headers and document to be sent to the user's browser. The actual response