Module: Dragonfly::DataMapperExtensions::ClassMethods
- Defined in:
- lib/dm-dragonfly.rb
Instance Method Summary collapse
Instance Method Details
#before_destroy(method) ⇒ Object
22 23 24 25 26 |
# File 'lib/dm-dragonfly.rb', line 22 def before_destroy(method) unless hooks[:destroy][:before].map{|h| h.instance_variable_get(:@method)}.include?(method) before(:destroy, method) end end |
#before_save(method) ⇒ Object
16 17 18 19 20 |
# File 'lib/dm-dragonfly.rb', line 16 def before_save(method) unless hooks[:save][:before].map{|h| h.instance_variable_get(:@method)}.include?(method) before(:save, method) end end |