Class: Engine2::DecodeListAction

Inherits:
DecodeAction show all
Defined in:
lib/engine2/action/decode.rb

Instance Attribute Summary

Attributes inherited from Action

#assets, #invokable, #meta, #node, #static

Instance Method Summary collapse

Methods inherited from DecodeAction

#decode, #post_process, #post_run, #pre_run, #separator, #show_max_selected

Methods included from ActionAPISupport

#config, #decorate, #field_filter, #fields, #fields!, #hide_fields, #loc!, #render, #show_fields

Methods included from ActionModelSupport

#hide_pk, #node_defined, #pre_run, #show_pk, #unsupported_association

Methods included from ActionQuerySupport

#find_record, #get_query, #post_run, #query, #select

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, #pre_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



57
58
59
# File 'lib/engine2/action/decode.rb', line 57

def invoke handler
    {entries: get_query.limit(200).load_all}
end

#order(*fields) ⇒ Object



61
62
63
# File 'lib/engine2/action/decode.rb', line 61

def order *fields
    @query = get_query.order *fields
end