1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionpack/lib/action_controller/session.rb
David Heinemeier Hansson 822742164e Forgot to include the new session module
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@254 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-22 14:30:29 +00:00

14 lines
No EOL
457 B
Ruby

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