instance method resolve_cached_associations

Ruby on Rails 7.2.3

Since v7.1.6

Available in: v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

resolve_cached_associations(record, entry)

No documentation comment.

Parameters

record req
entry req
Source
# File activerecord/lib/active_record/message_pack.rb, line 111
      def resolve_cached_associations(record, entry)
        i = 3 # entry == [class_name, attributes_hash, is_new_record, *associations]
        while i < entry.length
          begin
            record.association(entry[i]).target = decode(entry[i + 1])
          rescue ActiveRecord::AssociationNotFoundError
            # The association no longer exists, so just skip it.
          end
          i += 2
        end
      end

Defined in activerecord/lib/active_record/message_pack.rb line 111 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::MessagePack::Decoder

Type at least 2 characters to search.

↑↓ navigate · open · esc close