Module: Engine2::ActionDeleteSupport

Includes:
ActionModelSupport
Included in:
ArrayDeleteAction, DeleteAction
Defined in:
lib/engine2/action.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ActionModelSupport

#hide_pk, #node_defined, #show_pk, #unsupported_association

Class Method Details

.included(action) ⇒ Object



1185
1186
1187
1188
# File 'lib/engine2/action.rb', line 1185

def self.included action
    action.http_method :delete
    action.action_type :delete
end

Instance Method Details

#pre_runObject



1190
1191
1192
1193
1194
# File 'lib/engine2/action.rb', line 1190

def pre_run
    super
    execute "action.errors || [action.parent().invoke(), action.panel_close()]"
    node.parent.parent.*.menu(:item_menu).option :confirm_delete, icon: "trash", show: "action.selected_size() == 0", button_loc: false
end