Module: DestroyedAt::HasOneAssociation
- Defined in:
- lib/destroyed_at/has_one_association.rb
Instance Method Summary collapse
Instance Method Details
#delete(method = options[:dependent]) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/destroyed_at/has_one_association.rb', line 3 def delete(method = [:dependent]) if load_target if method == :destroy && target.respond_to?(:destroyed_at) target.destroy(owner.destroyed_at) else super end end end |