instance method
_marshal_dump_7_1
Ruby on Rails 7.2.3
Since v7.1.6Signature
_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