Class: Alchemy::Admin::Filters::Select
- Defined in:
- app/models/alchemy/admin/filters/select.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(name:, resource_name:, options:) ⇒ Select
constructor
Creates a resource filter that displays as a select.
-
#input_component(params, query) ⇒ Alchemy::Admin::Resource::SelectFilter
Returns a select filter component.
Methods inherited from Base
Constructor Details
#initialize(name:, resource_name:, options:) ⇒ Select
Creates a resource filter that displays as a select.
13 14 15 16 |
# File 'app/models/alchemy/admin/filters/select.rb', line 13 def initialize(name:, resource_name:, options:) super(name:, resource_name:) @options = () end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'app/models/alchemy/admin/filters/select.rb', line 7 def @options end |
Instance Method Details
#input_component(params, query) ⇒ Alchemy::Admin::Resource::SelectFilter
Returns a select filter component.
22 23 24 25 26 27 28 29 30 31 |
# File 'app/models/alchemy/admin/filters/select.rb', line 22 def input_component(params, query) Alchemy::Admin::Resource::SelectFilter.new( name:, resource_name:, label: translated_name, include_blank:, options: (query), params: ) end |