Module: MetaController::Adaptors::DestroyAction
- Defined in:
- lib/meta_controller/adaptors/destroy_action.rb
Instance Method Summary collapse
Instance Method Details
#destroy_action ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/meta_controller/adaptors/destroy_action.rb', line 6 def destroy_action controller_eval do define_callbacks :before_destroy_find define_callbacks :after_destroy_find end define_controller_method(:destroy, %{ run_callbacks(:before_destroy_find) #{short_model_name} run_callbacks(:after_destroy_find) render_destroy(#{short_model_name}) { #{short_model_name}.destroy } }) end |