Class: Engine2::ConfirmMeta

Inherits:
Meta show all
Includes:
MetaMenuSupport, MetaPanelSupport
Defined in:
lib/engine2/meta.rb

Instance Attribute Summary

Attributes inherited from Meta

#action, #assets, #invokable, #static

Instance Method Summary collapse

Methods included from MetaPanelSupport

#footer, #modal_action, #panel, #panel_class, #panel_panel_template, #panel_template, #panel_title, #post_run

Methods included from MetaMenuSupport

#menu, #post_process

Methods inherited from Meta

#action_defined, #check_static_meta, #dynamic?, #freeze_meta, #get, http_method, #http_method, inherited, #initialize, #invoke!, #lookup, #merge, #meta_type, meta_type, #post_process, #post_run, #request, #request_meta_proc_params, #response, #split_keys

Constructor Details

This class inherits a constructor from Engine2::Meta

Instance Method Details

#invoke(handler) ⇒ Object



485
486
487
488
# File 'lib/engine2/meta.rb', line 485

def invoke handler
    params = handler.request.params
    # params.merge({arguments: params.keys})
end

#pre_runObject



473
474
475
476
477
478
479
480
481
482
483
# File 'lib/engine2/meta.rb', line 473

def pre_run
    super
    panel_template 'scaffold/message'
    panel_title LOCS[:confirmation]
    panel_class 'modal-default'

    menu :panel_menu do
        option :approve, icon: "ok", loc: LOCS[:ok], disabled: 'action.action_pending'
        option :cancel, icon: "remove"
    end
end