Class: UI::SelectGroupComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- UI::SelectGroupComponent
- Includes:
- SelectGroupBehavior
- Defined in:
- app/view_components/ui/select_group_component.rb
Overview
GroupComponent - ViewComponent implementation
Container for grouping select items with a label.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(classes: "", **attributes) ⇒ SelectGroupComponent
constructor
A new instance of SelectGroupComponent.
Methods included from SelectGroupBehavior
#select_group_classes, #select_group_html_attributes
Constructor Details
#initialize(classes: "", **attributes) ⇒ SelectGroupComponent
Returns a new instance of SelectGroupComponent.
18 19 20 21 |
# File 'app/view_components/ui/select_group_component.rb', line 18 def initialize(classes: "", **attributes) @classes = classes @attributes = attributes end |
Instance Method Details
#call ⇒ Object
23 24 25 |
# File 'app/view_components/ui/select_group_component.rb', line 23 def call content_tag :div, content, **select_group_html_attributes.deep_merge(@attributes) end |