From 3d27e97feea4a8aff664e8657de4ae0cdcdc065d Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Mon, 28 Jan 2019 13:27:19 -0600 Subject: [PATCH] Fix bug where checking payment providers were validated improperly in rails 4.1 --- app/models/donation.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/donation.rb b/app/models/donation.rb index d014f737..43f995c9 100644 --- a/app/models/donation.rb +++ b/app/models/donation.rb @@ -25,7 +25,7 @@ class Donation < ActiveRecord::Base validates :supporter, presence: true validates :nonprofit, presence: true validates_associated :charges - validates :payment_provider, inclusion: { in: %(credit_card sepa) }, allow_blank: true + validates :payment_provider, inclusion: { in: ["credit_card", "sepa"]}, allow_blank: true has_many :charges has_many :campaign_gifts, dependent: :destroy