diff --git a/app/controllers/hyrax/my/works_controller_decorator.rb b/app/controllers/hyrax/my/works_controller_decorator.rb new file mode 100644 index 0000000000..2817729e96 --- /dev/null +++ b/app/controllers/hyrax/my/works_controller_decorator.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +## +# OVERRIDE Hyrax 3.5.0; when Hyrax hits v4.0.0 we can remove this. +# @see https://github.com/samvera/hyrax/pull/5972 +module Hyrax + module My + module WorksControllerDecorator + def collection_service + cloned = clone + cloned.params = {} + Hyrax::CollectionsService.new(cloned) + end + end + end +end + +Hyrax::My::WorksController.prepend(Hyrax::My::WorksControllerDecorator)