From 134cc777f2f3104b56575a03874a3cd0f42b0720 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Wed, 18 Aug 2021 13:16:32 -0700 Subject: [PATCH] rubocop friendyly fire (#320) --- app/factories/bulkrax/object_factory.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/factories/bulkrax/object_factory.rb b/app/factories/bulkrax/object_factory.rb index 079d5a2c..6ae865c1 100644 --- a/app/factories/bulkrax/object_factory.rb +++ b/app/factories/bulkrax/object_factory.rb @@ -41,7 +41,7 @@ def run! def update raise "Object doesn't exist" unless object destroy_existing_files if @replace_files && klass != Collection - attrs = update + attrs = attribute_update run_callbacks :save do klass == Collection ? update_collection(attrs) : work_actor.update(environment(attrs)) end @@ -201,7 +201,7 @@ def create_attributes # Strip out the :collection key, and add the member_of_collection_ids, # which is used by Hyrax::Actors::AddAsMemberOfCollectionsActor - def update_attributes + def attribute_update return transform_attributes.except(:id) if klass == Collection if attributes[:collection].present? transform_attributes.except(:id).except(:collection).merge(member_of_collections_attributes: { 0 => { id: collection.id } })