123456789_123456789_123456789_123456789_123456789_

Class: ActiveStorage::Attached::Changes::DeleteMany

Do not use. This class is for internal use only.
Relationships & Source Files
Inherits: Object
Defined in: activestorage/lib/active_storage/attached/changes/delete_many.rb

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(name, record) ⇒ DeleteMany

[ GitHub ]

  
# File 'activestorage/lib/active_storage/attached/changes/delete_many.rb', line 7

def initialize(name, record)
  @name, @record = name, record
end

Instance Attribute Details

#name (readonly)

[ GitHub ]

  
# File 'activestorage/lib/active_storage/attached/changes/delete_many.rb', line 5

attr_reader :name, :record

#record (readonly)

[ GitHub ]

  
# File 'activestorage/lib/active_storage/attached/changes/delete_many.rb', line 5

attr_reader :name, :record

Instance Method Details

#attachables

[ GitHub ]

  
# File 'activestorage/lib/active_storage/attached/changes/delete_many.rb', line 11

def attachables
  []
end

#attachments

[ GitHub ]

  
# File 'activestorage/lib/active_storage/attached/changes/delete_many.rb', line 15

def attachments
  ActiveStorage::Attachment.none
end

#blobs

[ GitHub ]

  
# File 'activestorage/lib/active_storage/attached/changes/delete_many.rb', line 19

def blobs
  ActiveStorage::Blob.none
end

#save

[ GitHub ]

  
# File 'activestorage/lib/active_storage/attached/changes/delete_many.rb', line 23

def save
  record.public_send("#{name}_attachments=", [])
end