Class: ActiveStorage::Attached::Changes::DeleteMany
- Defined in:
- activestorage/lib/active_storage/attached/changes/delete_many.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#record ⇒ Object
readonly
Returns the value of attribute record.
Instance Method Summary collapse
- #attachables ⇒ Object
- #attachments ⇒ Object
- #blobs ⇒ Object
-
#initialize(name, record) ⇒ DeleteMany
constructor
A new instance of DeleteMany.
- #save ⇒ Object
Constructor Details
#initialize(name, record) ⇒ DeleteMany
Returns a new instance of DeleteMany.
7 8 9 |
# 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 ⇒ Object (readonly)
Returns the value of attribute name
5 6 7 |
# File 'activestorage/lib/active_storage/attached/changes/delete_many.rb', line 5 def name @name end |
#record ⇒ Object (readonly)
Returns the value of attribute record
5 6 7 |
# File 'activestorage/lib/active_storage/attached/changes/delete_many.rb', line 5 def record @record end |
Instance Method Details
#attachables ⇒ Object
11 12 13 |
# File 'activestorage/lib/active_storage/attached/changes/delete_many.rb', line 11 def attachables [] end |
#attachments ⇒ Object
15 16 17 |
# File 'activestorage/lib/active_storage/attached/changes/delete_many.rb', line 15 def ActiveStorage::Attachment.none end |
#blobs ⇒ Object
19 20 21 |
# File 'activestorage/lib/active_storage/attached/changes/delete_many.rb', line 19 def blobs ActiveStorage::Blob.none end |
#save ⇒ Object
23 24 25 |
# File 'activestorage/lib/active_storage/attached/changes/delete_many.rb', line 23 def save record.public_send("#{name}_attachments=", []) end |