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 00000000..646ed3e2 --- /dev/null +++ b/app/controllers/hyrax/my/works_controller_decorator.rb @@ -0,0 +1,21 @@ +# 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 + + private + + def collections_service + cloned = clone + cloned.params = {} + Hyrax::CollectionsService.new(cloned) + end + end + end +end + +Hyrax::My::WorksController.prepend(Hyrax::My::WorksControllerDecorator)