instance method _marshal_dump_7_1

Ruby on Rails 7.1.6

Since v7.1.6

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

Signature

_marshal_dump_7_1()

No documentation comment.

Source
# File activerecord/lib/active_record/marshalling.rb, line 24
      def _marshal_dump_7_1
        payload = [attributes_for_database, new_record?]

        cached_associations = self.class.reflect_on_all_associations.select do |reflection|
          if association_cached?(reflection.name)
            association = association(reflection.name)
            association.loaded? || association.target.present?
          end
        end

        unless cached_associations.empty?
          payload << cached_associations.map do |reflection|
            [reflection.name, association(reflection.name).target]
          end
        end

        payload
      end

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

Defined in ActiveRecord::Marshalling::Methods

Type at least 2 characters to search.

↑↓ navigate · open · esc close