Skip to content
Browse files

Fix the session= deprecation to include the secret key

  • Loading branch information...
1 parent 0118665 commit 43cc69cb6518ecae816c33513081236dd46702f3 @wycats wycats committed Aug 3, 2010
Showing with 5 additions and 0 deletions.
  1. +5 −0 actionpack/lib/action_controller/deprecated/base.rb
View
5 actionpack/lib/action_controller/deprecated/base.rb
@@ -81,6 +81,11 @@ def session(*args)
def session=(value)
ActiveSupport::Deprecation.warn "ActionController::Base.session= is deprecated. " <<
"Please configure it on your application with config.session_store :cookie_store, :key => '....'", caller
+
+ if secret = value.delete(:secret)
+ Rails.application.config.secret_token = secret
+ end
+
if value.delete(:disabled)
Rails.application.config.session_store :disabled
else

0 comments on commit 43cc69c

Please sign in to comment.
Something went wrong with that request. Please try again.