Class: ActiveStorage::Attached::Changes::DetachOne
Do not use. This class is for internal use only.
Relationships & Source Files | |
Inherits: | Object |
Defined in: | activestorage/lib/active_storage/attached/changes/detach_one.rb |
Class Method Summary
- .new(name, record, attachment) ⇒ DetachOne constructor
Instance Attribute Summary
- #attachment readonly
- #name readonly
- #record readonly
Instance Method Summary
Constructor Details
.new(name, record, attachment) ⇒ DetachOne
Instance Attribute Details
#attachment (readonly)
[ GitHub ]#name (readonly)
[ GitHub ]# File 'activestorage/lib/active_storage/attached/changes/detach_one.rb', line 5
attr_reader :name, :record, :
#record (readonly)
[ GitHub ]# File 'activestorage/lib/active_storage/attached/changes/detach_one.rb', line 5
attr_reader :name, :record, :
Instance Method Details
#detach
[ GitHub ]# File 'activestorage/lib/active_storage/attached/changes/detach_one.rb', line 11
def detach if .present? .delete reset end end