Skip to content

Commit

Permalink
Merge pull request #2023 from samvera/add-to-collection-for-second-pa…
Browse files Browse the repository at this point in the history
…ge-work

🐛 Fix Add to Collection for page 2+ of works
  • Loading branch information
jeremyf authored Oct 13, 2023
2 parents 961b712 + 6930f7f commit ae6de21
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions app/controllers/hyrax/my/works_controller_decorator.rb
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit ae6de21

Please sign in to comment.