aboutsummaryrefslogtreecommitdiffstats
path: root/railties/helpers/application.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/helpers/application.rb')
-rw-r--r--railties/helpers/application.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/railties/helpers/application.rb b/railties/helpers/application.rb
index 3bef7f583e..c901717712 100644
--- a/railties/helpers/application.rb
+++ b/railties/helpers/application.rb
@@ -2,6 +2,9 @@
# Likewise, all the methods added will be available for all controllers.
class ApplicationController < ActionController::Base
- # Pick a unique cookie name to distinguish our session data from others'
- session :session_key => '_<%= app_name %>_session_id'
+ # Pick a unique cookie name to distinguish our session from others.
+ # Session data is stored in a cookie by default, so the data is hashed
+ # with a secret to ensure its integrity.
+ session :session_key => '_<%= app_name %>_session',
+ :secret => '<%= CGI::Session.generate_unique_id(app_name) %>'
end