From d7017db267a0bc6c1a34a7d14505ef593f9334cd Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Wed, 21 Nov 2018 16:18:25 -0600 Subject: [PATCH] You can't use campaign gift options in a child campaign --- lib/create/create_peer_to_peer_campaign.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/create/create_peer_to_peer_campaign.rb b/lib/create/create_peer_to_peer_campaign.rb index f93ece94..854ca4db 100644 --- a/lib/create/create_peer_to_peer_campaign.rb +++ b/lib/create/create_peer_to_peer_campaign.rb @@ -28,12 +28,6 @@ module CreatePeerToPeerCampaign return { errors: campaign.errors.messages }.as_json unless campaign.errors.empty? - gift_option_params = [] - parent_campaign.campaign_gift_options.each do |option| - excluded_for_peer_to_peer = %w(id campaign_id created_at updated_at) - campaign.campaign_gift_options.create option.attributes.except(*excluded_for_peer_to_peer) - end - campaign.as_json end end