Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Forgot to include the new session module

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@254 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 822742164e8eaaecb346b03d3662a8fd2284f8c6 1 parent edbeec9
@dhh dhh authored
Showing with 14 additions and 0 deletions.
  1. +14 −0 actionpack/lib/action_controller/session.rb
View
14 actionpack/lib/action_controller/session.rb
@@ -0,0 +1,14 @@
+module ActionController #:nodoc:
+ module Session #:nodoc:
+ def self.append_features(base) #:nodoc:
+ super #:nodoc:
+ base.after_filter(:clear_persistant_model_associations)
+ end
+
+ private
+ def clear_persistant_model_associations #:doc:
+ session = @session.instance_variable_get("@data")
+ session.each { |key, obj| obj.clear_association_cache if obj.respond_to?(:clear_association_cache) } if session
+ end
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.