Class: Engine2::StarToManyUnlinkAction
- Inherits:
-
StarToManyUnlinkActionBase
- Object
- Action
- StarToManyUnlinkActionBase
- Engine2::StarToManyUnlinkAction
- 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
94 95 96 97 98 |
# File 'lib/engine2/action/link.rb', line 94 def invoke handler handler.permit id = handler.params[:id] handler.permit parent = handler.params[:parent_id] invoke_unlink_db handler, split_keys(parent), [id] end |
#pre_run ⇒ Object
89 90 91 92 |
# File 'lib/engine2/action/link.rb', line 89 def pre_run super node.parent.parent.*.(:item_menu).option :confirm_unlink, icon: "minus", show: "action.selected_size() == 0", button_loc: false end |