Class: Katalyst::Tables::Selectable::FormComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Katalyst::Tables::Selectable::FormComponent
- Includes:
- HtmlAttributes, Identifiable::Defaults
- Defined in:
- app/components/katalyst/tables/selectable/form_component.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#primary_key ⇒ Object
readonly
Returns the value of attribute primary_key.
Instance Method Summary collapse
-
#initialize(collection:, id: nil, primary_key: :id) ⇒ FormComponent
constructor
A new instance of FormComponent.
- #inspect ⇒ Object
Methods included from Identifiable::Defaults
Constructor Details
#initialize(collection:, id: nil, primary_key: :id) ⇒ FormComponent
Returns a new instance of FormComponent.
15 16 17 18 19 20 21 22 23 |
# File 'app/components/katalyst/tables/selectable/form_component.rb', line 15 def initialize(collection:, id: nil, primary_key: :id) super() @collection = collection @id = id || Selectable.default_form_id(collection) @primary_key = primary_key end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
10 11 12 |
# File 'app/components/katalyst/tables/selectable/form_component.rb', line 10 def id @id end |
#primary_key ⇒ Object (readonly)
Returns the value of attribute primary_key.
10 11 12 |
# File 'app/components/katalyst/tables/selectable/form_component.rb', line 10 def primary_key @primary_key end |
Instance Method Details
#inspect ⇒ Object
25 26 27 |
# File 'app/components/katalyst/tables/selectable/form_component.rb', line 25 def inspect "#<#{self.class.name} id: #{id.inspect}, primary_key: #{primary_key.inspect}>" end |