Class: Spotlight::SaveSearchComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Spotlight::SaveSearchComponent
- Defined in:
- app/components/spotlight/save_search_component.rb
Overview
Displays the “Save this search” button and modal
Instance Attribute Summary collapse
-
#button_classes ⇒ Object
readonly
Returns the value of attribute button_classes.
Instance Method Summary collapse
- #button ⇒ Object
- #form_path ⇒ Object
-
#initialize(button_classes: 'btn btn-secondary') ⇒ SaveSearchComponent
constructor
A new instance of SaveSearchComponent.
Constructor Details
#initialize(button_classes: 'btn btn-secondary') ⇒ SaveSearchComponent
Returns a new instance of SaveSearchComponent.
6 7 8 9 |
# File 'app/components/spotlight/save_search_component.rb', line 6 def initialize(button_classes: 'btn btn-secondary') @button_classes = super end |
Instance Attribute Details
#button_classes ⇒ Object (readonly)
Returns the value of attribute button_classes.
11 12 13 |
# File 'app/components/spotlight/save_search_component.rb', line 11 def @button_classes end |
Instance Method Details
#button ⇒ Object
16 17 18 19 |
# File 'app/components/spotlight/save_search_component.rb', line 16 def t(:'spotlight.saved_search.label'), id: 'save-this-search', class: , data: { toggle: 'modal', 'bs-toggle': 'modal', target: '#save-modal', 'bs-target': '#save-modal' } end |