class ActiveStorage::Attached::Many

def attachments

All methods called on this proxy object that aren't listed here will automatically be delegated to +attachments+.

Returns all the associated attachment records.
def attachments
  change.present? ? change.attachments : record.public_send("#{name}_attachments")
end