app/controllers/hyrax/batch_edits_controller.rb in hyrax-3.0.0.pre.beta2 vs app/controllers/hyrax/batch_edits_controller.rb in hyrax-3.0.0.pre.beta3

- old
+ new

@@ -36,11 +36,11 @@ false end def destroy_collection batch.each do |doc_id| - obj = ActiveFedora::Base.find(doc_id, cast: true) + obj = Hyrax.query_service.find_by_alternate_identifier(alternate_identifier: doc_id, use_valkyrie: false) obj.destroy end flash[:notice] = "Batch delete complete" after_destroy_collection end @@ -58,11 +58,11 @@ def update case params["update_type"] when "update" batch.each do |doc_id| - update_document(ActiveFedora::Base.find(doc_id)) + update_document(Hyrax.query_service.find_by_alternate_identifier(alternate_identifier: doc_id, use_valkyrie: false)) end flash[:notice] = "Batch update complete" after_update when "delete_all" destroy_batch @@ -80,10 +80,10 @@ # our local paths. Thus we are unable to just override `self.local_prefixes` @_prefixes ||= super + ['hyrax/base'] end def destroy_batch - batch.each { |id| ActiveFedora::Base.find(id).destroy } + batch.each { |id| Hyrax.query_service.find_by_alternate_identifier(alternate_identifier: id, use_valkyrie: false).destroy } after_update end def form_class Forms::BatchEditForm