diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/environments/environment.rb | 8 | ||||
-rw-r--r-- | railties/helpers/application.rb | 5 |
2 files changed, 6 insertions, 7 deletions
diff --git a/railties/environments/environment.rb b/railties/environments/environment.rb index fe12591ded..e7526ab5e3 100644 --- a/railties/environments/environment.rb +++ b/railties/environments/environment.rb @@ -40,7 +40,11 @@ Rails::Initializer.run do |config| # Make Active Record use UTC-base instead of local time # config.active_record.default_timezone = :utc - + + # Your secret key for verifying cookie session data integrity. + # If you change this key, all old sessions will become invalid! + config.action_controller.session = { :secret => '<%= CGI::Session.generate_unique_id(app_name) %>' } + # See Rails::Configuration for more options end @@ -57,4 +61,4 @@ end # Mime::Type.register "text/richtext", :rtf # Mime::Type.register "application/x-mobile", :mobile -# Include your application configuration below
\ No newline at end of file +# Include your application configuration below diff --git a/railties/helpers/application.rb b/railties/helpers/application.rb index c901717712..b61c6de386 100644 --- a/railties/helpers/application.rb +++ b/railties/helpers/application.rb @@ -2,9 +2,4 @@ # Likewise, all the methods added will be available for all controllers. class ApplicationController < ActionController::Base - # 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 |