aboutsummaryrefslogblamecommitdiffstats
path: root/actionpack/lib/action_controller/session.rb
blob: f3c3f874998bca8d0007dbd94502455c3486ea9f (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
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