Skip to content

Commit

Permalink
Merge pull request #198 from scientist-softserv/fix-add-to-collection
Browse files Browse the repository at this point in the history
πŸ› Fix "Add to Collection" for page 2+ of works
  • Loading branch information
laritakr authored Nov 27, 2023
2 parents f6109d4 + 182c165 commit c3c851f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions app/controllers/hyrax/my/works_controller_decorator.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 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)

0 comments on commit c3c851f

Please sign in to comment.