Fix bug where checking payment providers were validated improperly in rails 4.1

This commit is contained in:
Eric Schultz 2019-01-28 13:27:19 -06:00 committed by Luis Castro
parent 30accb5e79
commit 3d27e97fee
No known key found for this signature in database
GPG key ID: 0A8F33D4C4E27639

View file

@ -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