Module: SimpleActiveStorage::Attached::One

Defined in:
lib/simple_active_storage/attached.rb

Instance Method Summary collapse

Instance Method Details

#attach(attachable) ⇒ Object



16
17
18
19
20
21
# File 'lib/simple_active_storage/attached.rb', line 16

def attach(attachable)
  record.try(:before_active_storage_attach,attachable)
  result = super attachable
  record.try(:after_active_storage_attach,{name: name, attachment: attachment})
  result
end