Sha256: 76d1f1dafda39be633753c235d0e08cfc101e8f5973a93c538f5a77e9f6a9d36
Contents?: true
Size: 521 Bytes
Versions: 5
Compression:
Stored size: 521 Bytes
Contents
module Qa::Authorities class FindWorks < Qa::Authorities::Base def search(_q, controller) # The FindWorksSearchBuilder expects a current_user return [] unless controller.current_user repo = CatalogController.new.repository builder = Hyrax::FindWorksSearchBuilder.new(controller) response = repo.search(builder) docs = response.documents docs.map do |doc| id = doc.id title = doc.title { id: id, label: title, value: id } end end end end
Version data entries
5 entries across 5 versions & 1 rubygems