app/controllers/hyrax/batch_edits_controller.rb in hyrax-5.0.0.rc1 vs app/controllers/hyrax/batch_edits_controller.rb in hyrax-5.0.0.rc2
- old
+ new
@@ -39,13 +39,13 @@
def destroy_collection
batch.each do |doc_id|
resource = Hyrax.query_service.find_by(id: Valkyrie::ID.new(doc_id))
transactions['collection_resource.destroy']
- .with_step_args('collection_resource.delete' => { user: current_user })
- .call(resource)
- .value!
+ .with_step_args('collection_resource.delete' => { user: current_user },
+ 'collection_resource.remove_from_membership' => { user: current_user })
+ .call(resource).value!
end
flash[:notice] = "Batch delete complete"
after_destroy_collection
end
@@ -106,12 +106,12 @@
def destroy_batch
batch.each do |id|
resource = Hyrax.query_service.find_by(id: Valkyrie::ID.new(id))
transactions['work_resource.destroy']
- .with_step_args('work_resource.delete' => { user: current_user })
- .call(resource)
- .value!
+ .with_step_args('work_resource.delete' => { user: current_user },
+ 'work_resource.delete_all_file_sets' => { user: current_user })
+ .call(resource).value!
end
after_update
end
def form_class