Method: OneAssociation#before_destroy
- Defined in:
- lib/yodel/models/core/associations/counts/one_association.rb
#before_destroy(record) ⇒ Object
7 8 9 10 11 |
# File 'lib/yodel/models/core/associations/counts/one_association.rb', line 7 def before_destroy(record) if @options['destroy'] == true record.get(name).try(:destroy) end end |