Class: SnFilterable::CategoryComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- SnFilterable::CategoryComponent
- Defined in:
- app/components/sn_filterable/category_component.rb
Overview
Renders a category to be displayed in the filtering sidebar/popup. Simple view component, logic to display filters should render a [:filter] (see [Filterable::FilterCategoryComponent])
Instance Method Summary collapse
-
#initialize(title: nil, open: false) ⇒ CategoryComponent
constructor
A new instance of CategoryComponent.
Constructor Details
#initialize(title: nil, open: false) ⇒ CategoryComponent
Returns a new instance of CategoryComponent.
13 14 15 16 |
# File 'app/components/sn_filterable/category_component.rb', line 13 def initialize(title: nil, open: false) @title = title @open = open end |