You can't use campaign gift options in a child campaign

This commit is contained in:
Eric Schultz 2018-11-21 16:18:25 -06:00
parent e8d2018c65
commit d7017db267

View file

@ -28,12 +28,6 @@ module CreatePeerToPeerCampaign
return { errors: campaign.errors.messages }.as_json unless campaign.errors.empty? 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 campaign.as_json
end end
end end