Sha256: a939b8d068cc7c802c48fe7fa6bb0d277e60c10299f2dc458284be7f943390f1
Contents?: true
Size: 451 Bytes
Versions: 71
Compression:
Stored size: 451 Bytes
Contents
# frozen_string_literal: true module ActiveStorage class Attached::Changes::DetachMany # :nodoc: attr_reader :name, :record, :attachments def initialize(name, record, attachments) @name, @record, @attachments = name, record, attachments end def detach if attachments.any? attachments.delete_all if attachments.respond_to?(:delete_all) record.attachment_changes.delete(name) end end end end
Version data entries
71 entries across 68 versions & 6 rubygems