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) ⇒ Object
- #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) ⇒ Object
20 21 22 23 24 |
# File 'app/components/blacklight/document/group_component.rb', line 20 def add_group_facet_params_and_redirect(group) Deprecation.silence(Blacklight::UrlHelperBehavior) do helpers.search_action_path(helpers.add_group_facet_params_and_redirect(group)) end 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 |