Class: Engine2::FileStoreMeta
- Defined in:
- lib/engine2/meta/infra_meta.rb
Instance Attribute Summary collapse
-
#field ⇒ Object
Returns the value of attribute field.
-
#model ⇒ Object
Returns the value of attribute model.
Attributes inherited from Meta
#action, #assets, #invokable, #static
Instance Method Summary collapse
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 Attribute Details
#field ⇒ Object
Returns the value of attribute field.
91 92 93 |
# File 'lib/engine2/meta/infra_meta.rb', line 91 def field @field end |
#model ⇒ Object
Returns the value of attribute model.
91 92 93 |
# File 'lib/engine2/meta/infra_meta.rb', line 91 def model @model end |
Instance Method Details
#invoke(handler) ⇒ Object
93 94 95 96 |
# File 'lib/engine2/meta/infra_meta.rb', line 93 def invoke handler handler.permit owner = handler.params[:owner] {files: E2Files.db[:files].select(:id, :name, :mime, :uploaded).where(owner: owner, model: model.name.to_s, field: field.to_s).all} end |