Sha256: 6397418e6994d7ae8c634cbe48abb3e08d7f42ae9831800db5774b63064d8202

Contents?: true

Size: 504 Bytes

Versions: 46

Compression:

Stored size: 504 Bytes

Contents

# Added to allow for the My controller to show only things I have edit access to
class Hyrax::My::HighlightsSearchBuilder < Hyrax::SearchBuilder
  include Hyrax::My::SearchBuilderBehavior

  self.default_processor_chain += [:show_only_highlighted_works]

  def show_only_highlighted_works(solr_parameters)
    ids = scope.current_user.trophies.pluck(:work_id)
    solr_parameters[:fq] ||= []
    solr_parameters[:fq] += [
      ActiveFedora::SolrQueryBuilder.construct_query_for_ids(ids)
    ]
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
hyrax-2.9.6 app/search_builders/hyrax/my/highlights_search_builder.rb
hyrax-2.9.5 app/search_builders/hyrax/my/highlights_search_builder.rb
hyrax-2.9.4 app/search_builders/hyrax/my/highlights_search_builder.rb
hyrax-2.9.3 app/search_builders/hyrax/my/highlights_search_builder.rb
hyrax-2.9.2 app/search_builders/hyrax/my/highlights_search_builder.rb
hyrax-2.9.1 app/search_builders/hyrax/my/highlights_search_builder.rb
hyrax-2.9.0 app/search_builders/hyrax/my/highlights_search_builder.rb
hyrax-2.8.0 app/search_builders/hyrax/my/highlights_search_builder.rb
hyrax-2.7.2 app/search_builders/hyrax/my/highlights_search_builder.rb
hyrax-2.7.1 app/search_builders/hyrax/my/highlights_search_builder.rb
hyrax-2.7.0 app/search_builders/hyrax/my/highlights_search_builder.rb
hyrax-2.6.0 app/search_builders/hyrax/my/highlights_search_builder.rb
hyrax-2.5.1 app/search_builders/hyrax/my/highlights_search_builder.rb
hyrax-2.5.0 app/search_builders/hyrax/my/highlights_search_builder.rb
hyrax-3.0.0.pre.beta2 app/search_builders/hyrax/my/highlights_search_builder.rb
hyrax-2.4.1 app/search_builders/hyrax/my/highlights_search_builder.rb
hyrax-3.0.0.pre.beta1 app/search_builders/hyrax/my/highlights_search_builder.rb
hyrax-2.4.0 app/search_builders/hyrax/my/highlights_search_builder.rb
hyrax-2.3.3 app/search_builders/hyrax/my/highlights_search_builder.rb
hyrax-2.3.2 app/search_builders/hyrax/my/highlights_search_builder.rb