Class: Blacklight::Document::GroupComponent
- Inherits:
-
Component
- Object
- ViewComponent::Base
- Component
- Blacklight::Document::GroupComponent
- Defined in:
- app/components/blacklight/document/group_component.rb
Overview
Render the ‘more like this’ results from the response
Constant Summary
Constants inherited from Component
Instance Method Summary collapse
-
#add_group_facet_params_and_redirect(group) ⇒ Hash
Get path to a search within a grouped result set.
- #grouped_documents ⇒ Object
-
#initialize(group:, group_limit: -1)) ⇒ GroupComponent
constructor
A new instance of GroupComponent.
Methods inherited from Component
Constructor Details
#initialize(group:, group_limit: -1)) ⇒ GroupComponent
Returns a new instance of GroupComponent.
11 12 13 14 |
# File 'app/components/blacklight/document/group_component.rb', line 11 def initialize(group:, group_limit: -1) @group = group @group_limit = group_limit end |
Instance Method Details
#add_group_facet_params_and_redirect(group) ⇒ Hash
Get path to a search within a grouped result set
24 25 26 27 28 |
# File 'app/components/blacklight/document/group_component.rb', line 24 def add_group_facet_params_and_redirect(group) helpers.search_action_path( helpers.search_state.add_facet_params_and_redirect(group.field, group.key) ) end |
#grouped_documents ⇒ Object
16 17 18 |
# File 'app/components/blacklight/document/group_component.rb', line 16 def grouped_documents helpers.render_document_index @group.docs end |