Sha256: 2295a5e9126bee7273a35a50eebb3f78305efb71fc8b6ae9a816f0fb219eb203

Contents?: true

Size: 416 Bytes

Versions: 5

Compression:

Stored size: 416 Bytes

Contents

module Qa::Authorities
  class FindWorks < Qa::Authorities::Base
    def search(_q, controller)
      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 & 2 rubygems

Version Path
hyrax-1.0.2 app/authorities/qa/authorities/find_works.rb
hyrax-1.0.1 app/authorities/qa/authorities/find_works.rb
hyrax-1.0.0.rc2 app/authorities/qa/authorities/find_works.rb
hyrax-1.0.0.rc1 app/authorities/qa/authorities/find_works.rb
test_hyrax-0.0.1.alpha app/authorities/qa/authorities/find_works.rb