Class: Engine2::FileStoreMeta

Inherits:
Meta show all
Defined in:
lib/engine2/meta/infra_meta.rb

Instance Attribute Summary collapse

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

Constructor Details

This class inherits a constructor from Engine2::Meta

Instance Attribute Details

#fieldObject

Returns the value of attribute field.



92
93
94
# File 'lib/engine2/meta/infra_meta.rb', line 92

def field
  @field
end

#modelObject

Returns the value of attribute model.



92
93
94
# File 'lib/engine2/meta/infra_meta.rb', line 92

def model
  @model
end

Instance Method Details

#invoke(handler) ⇒ Object



94
95
96
97
# File 'lib/engine2/meta/infra_meta.rb', line 94

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