Class: Katalyst::Tables::Query::InputComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Katalyst::Tables::Query::InputComponent
- Includes:
- HtmlAttributes
- Defined in:
- app/components/katalyst/tables/query/input_component.rb
Instance Attribute Summary collapse
-
#form ⇒ Object
readonly
Returns the value of attribute form.
Instance Method Summary collapse
- #collection ⇒ Object
-
#initialize(form:, input: {}) ⇒ InputComponent
constructor
A new instance of InputComponent.
- #name ⇒ Object
Constructor Details
#initialize(form:, input: {}) ⇒ InputComponent
Returns a new instance of InputComponent.
13 14 15 16 17 18 19 |
# File 'app/components/katalyst/tables/query/input_component.rb', line 13 def initialize(form:, input: {}, **) super(**) @form = form update_input_attributes(**input) end |
Instance Attribute Details
#form ⇒ Object (readonly)
Returns the value of attribute form.
9 10 11 |
# File 'app/components/katalyst/tables/query/input_component.rb', line 9 def form @form end |
Instance Method Details
#collection ⇒ Object
26 27 28 |
# File 'app/components/katalyst/tables/query/input_component.rb', line 26 def collection form.object end |
#name ⇒ Object
21 22 23 24 |
# File 'app/components/katalyst/tables/query/input_component.rb', line 21 def name query_attribute || raise(ArgumentError, "No query attribute. " \ "Does your collection include Katalyst::Tables::Collection::Query?") end |