Class: Engine2::StarToManyBulkUnlinkAction
- Inherits:
-
StarToManyUnlinkActionBase
- Object
- Action
- StarToManyUnlinkActionBase
- Engine2::StarToManyBulkUnlinkAction
- Defined in:
- lib/engine2/action/link.rb
Instance Attribute Summary
Attributes inherited from Action
#assets, #invokable, #meta, #node, #static
Instance Method Summary collapse
Methods inherited from StarToManyUnlinkActionBase
Methods included from ActionModelSupport
#hide_pk, #node_defined, #show_pk, #unsupported_association
Methods inherited from Action
action_type, #action_type, #arguments, #check_anonymous_action_class, #check_static_action, #define_invoke, #define_method, #dynamic?, #execute, #freeze_action, #http_method, http_method, inherit, inherited, #initialize, #invoke!, #join_keys, #lookup, #merge, #node_defined, #post_process, #post_run, #repeat, #request, #request_action_proc_params, #split_keys
Constructor Details
This class inherits a constructor from Engine2::Action
Instance Method Details
#invoke(handler) ⇒ Object
110 111 112 113 114 115 |
# File 'lib/engine2/action/link.rb', line 110 def invoke handler ids = handler.param_to_json(:ids) handler.permit parent = handler.params[:parent_id] handler.permit ids.is_a?(Array) invoke_unlink_db handler, split_keys(parent), ids end |
#pre_run ⇒ Object
104 105 106 107 108 |
# File 'lib/engine2/action/link.rb', line 104 def pre_run super node.parent.parent.*. node.parent.parent.*.(:menu).option_after :default_order, :confirm_bulk_unlink, icon: "minus", show: "action.selected_size() > 0", button_loc: false end |