Skip to content

Commit

Permalink
🐛 Fix collection membership bug (#2169)
Browse files Browse the repository at this point in the history
* 🐛 Fix collection membership bug

A hyrax bug made it into Hyku via the collections controller decorator.
This removes the unnecessary `collection_params method`.

Refs
- scientist-softserv/hykuup_knapsack#183
- samvera/hyrax@7add213

* Ignore rubocop error
  • Loading branch information
laritakr authored Mar 22, 2024
1 parent ae46a17 commit 9614850
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Metrics/BlockLength:
- 'lib/tasks/*.rake'
- 'spec/**/*.rb'
- 'tasks/benchmark.rake'
- 'config/application.rb'

Style/AsciiComments:
Enabled: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,18 +145,6 @@ def create_logo_info(uploaded_file_id, alttext, linkurl)
logo_info
end

def collection_params
if Hyrax.config.collection_class < ActiveFedora::Base
@participants = extract_old_style_permission_attributes(params[:collection])
form_class.model_attributes(params[:collection])
else
params.permit(collection: {})[:collection]
.merge(params.permit(:collection_type_gid)
.with_defaults(collection_type_gid: default_collection_type_gid))
.merge(member_of_collection_ids: Array(params[:parent_id]))
end
end

# rubocop:disable Metrics/MethodLength
def process_uploaded_thumbnail(uploaded_file)
dir_name = UploadedCollectionThumbnailPathService.upload_dir(@collection)
Expand Down

0 comments on commit 9614850

Please sign in to comment.