lib/identity_cache/cached/recursive/association.rb in identity_cache-1.1.0 vs lib/identity_cache/cached/recursive/association.rb in identity_cache-1.2.0

- old
+ new

@@ -1,6 +1,7 @@ # frozen_string_literal: true + module IdentityCache module Cached module Recursive class Association < Cached::Association # :nodoc: def initialize(name, reflection:) @@ -75,9 +76,10 @@ private def set_inverse(record, association_target) return if association_target.nil? + associated_class = reflection.klass inverse_cached_association = associated_class.cached_belongs_tos[inverse_name] return unless inverse_cached_association if association_target.is_a?(Array)