Sha256: 894845b46c24db54347a9b72c8a6eb9a538a8c1bb646fa20081beaafb6936e8d
Contents?: true
Size: 576 Bytes
Versions: 9
Compression:
Stored size: 576 Bytes
Contents
# -*- encoding: utf-8 -*- 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
9 entries across 9 versions & 1 rubygems