Class: Hyrax::My::HighlightsSearchBuilder
- Inherits:
-
SearchBuilder
- Object
- SearchBuilder
- SearchBuilder
- Hyrax::My::HighlightsSearchBuilder
- Includes:
- SearchBuilderBehavior
- Defined in:
- app/search_builders/hyrax/my/highlights_search_builder.rb
Overview
Added to allow for the My controller to show only things I have edit access to
Instance Method Summary collapse
Methods included from SearchBuilderBehavior
Instance Method Details
#show_only_highlighted_works(solr_parameters) ⇒ Object
8 9 10 11 12 |
# File 'app/search_builders/hyrax/my/highlights_search_builder.rb', line 8 def show_only_highlighted_works(solr_parameters) ids = scope.current_user.trophies.pluck(:work_id) solr_parameters[:fq] ||= [] solr_parameters[:fq] += [Hyrax::SolrQueryBuilderService.construct_query_for_ids([ids])] end |