aboutsummaryrefslogtreecommitdiffstats
path: root/railties/helpers/application.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-05-07 08:28:42 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-05-07 08:28:42 +0000
commit0adcd811f945603a8037febaa158bbc1ffaba9d1 (patch)
tree81cfd5568be550302c60b076b29314d5e59db688 /railties/helpers/application.rb
parentd08d89c09285ac6c65273c935a1afbbc983f7544 (diff)
downloadrails-0adcd811f945603a8037febaa158bbc1ffaba9d1.tar.gz
rails-0adcd811f945603a8037febaa158bbc1ffaba9d1.tar.bz2
rails-0adcd811f945603a8037febaa158bbc1ffaba9d1.zip
The app generator sets a session key in application.rb so apps running on the same host may distinguish their cookies. Closes #2967.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4328 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/helpers/application.rb')
-rw-r--r--railties/helpers/application.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/railties/helpers/application.rb b/railties/helpers/application.rb
index 537de40d7e..99e4b0d1cf 100644
--- a/railties/helpers/application.rb
+++ b/railties/helpers/application.rb
@@ -1,4 +1,10 @@
-# Filters added to this controller will be run for all controllers in the application.
+# Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.
+
class ApplicationController < ActionController::Base
-end \ No newline at end of file
+ # Pick a unique cookie name to distinguish our session data from others'.
+ session :session_key => '_<%= app_name %>_session_id'
+
+ # Or disable sessions entirely.
+ #session :off
+end