app/authorities/qa/authorities/collections.rb in hyrax-3.2.0 vs app/authorities/qa/authorities/collections.rb in hyrax-3.3.0

- old
+ new

@@ -5,16 +5,15 @@ self.search_builder_class = Hyrax::CollectionSearchBuilder def search(_q, controller) # The Hyrax::CollectionSearchBuilder expects a current_user return [] unless controller.current_user - response, _docs = search_response(controller) + response, = search_response(controller) docs = response.documents + docs.map do |doc| - id = doc.id - title = doc.title - { id: id, label: title, value: id } + { id: doc.id, label: doc.title, value: doc.id } end end private @@ -30,10 +29,10 @@ def search_response(controller) access = controller.params[:access] || 'read' search_service(controller).search_results do |builder| - builder.where(controller.params[:q]) + builder.with({ q: controller.params[:q] }) .with_access(access) .rows(100) end end end