Module: Engine2::ActionBulkDeleteSupport

Includes:
ActionModelSupport
Included in:
BulkDeleteAction
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



1200
1201
1202
1203
# File 'lib/engine2/action.rb', line 1200

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

Instance Method Details

#pre_runObject



1205
1206
1207
1208
1209
1210
# File 'lib/engine2/action.rb', line 1205

def pre_run
    super
    execute "action.errors || [action.parent().invoke(), action.panel_close()]"
    node.parent.parent.*.select_toggle_menu
    node.parent.parent.*.menu(:menu).option_after :default_order, :confirm_bulk_delete, icon: "trash", show: "action.selected_size() > 0"
end