Sha256: 825f9f727503685f8c8c5ff14b09f76dcc0fda014d20af1dd182a0ffe210fd14
Contents?: true
Size: 550 Bytes
Versions: 12
Compression:
Stored size: 550 Bytes
Contents
module Kasket module ReloadAssociationMixin # TODO write tests for this def reload_with_kasket_clearing(*args) if loaded? Kasket.clear_local if target.class.include?(WriteMixin) else target_class = proxy_reflection.options[:polymorphic] ? association_class : proxy_reflection.klass Kasket.clear_local if target_class.include?(WriteMixin) end reload_without_kasket_clearing(*args) end def self.included(base) base.alias_method_chain :reload, :kasket_clearing end end end
Version data entries
12 entries across 12 versions & 1 rubygems