Class: Engine2::ViewMeta
- Includes:
- MetaQuerySupport, MetaViewSupport
- Defined in:
- lib/engine2/meta/view_meta.rb
Instance Attribute Summary
Attributes inherited from Meta
#action, #assets, #invokable, #static
Instance Method Summary collapse
Methods included from MetaViewSupport
Methods included from MetaModelSupport
#action_defined, #get_type_info, #hide_pk, #pre_run, #show_pk, #unsupported_association
Methods included from MetaAPISupport
#config, #decorate, #field_filter, #hide_fields, #info, #info!, #render, #show_fields
Methods included from MetaTabSupport
#field_tabs, #lazy_tab, #select_tabs
Methods included from MetaPanelSupport
#glyphicon, #modal_action, #panel, #panel_class, #panel_panel_template, #panel_template, #panel_title, #post_run, #pre_run
Methods included from MetaMenuSupport
Methods included from MetaQuerySupport
#get_query, #post_run, #query, #select
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, #pre_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
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/engine2/meta/view_meta.rb', line 11 def invoke handler handler.permit id = handler.params[:id] record = get_query[assets[:model].primary_keys_hash_qualified(split_keys(id))] if record static.record(handler, record) {record: record} else handler.halt_not_found LOCS[:no_entry] end end |
#record(handler, record) ⇒ Object
8 9 |
# File 'lib/engine2/meta/view_meta.rb', line 8 def record handler, record end |