Module: MetaController::Adaptors::UpdateAction
- Defined in:
- lib/meta_controller/adaptors/update_action.rb
Instance Method Summary collapse
Instance Method Details
#update_action ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/meta_controller/adaptors/update_action.rb', line 6 def update_action controller_eval do define_callbacks :before_update_find define_callbacks :after_update_find end define_controller_method(:update, %{ run_callbacks(:before_update_find) #{short_model_name} run_callbacks(:after_update_find) render_update(#{short_model_name}, :action_failed => 'form') { #{short_model_name}.update_attributes(params[:#{long_model_name}]) } }) end |