fix(campaign): add explicit source for payments relation

This commit is contained in:
Luis Castro 2019-07-14 10:49:40 +02:00
parent 4992253540
commit 22bf0713f9
No known key found for this signature in database
GPG key ID: 0A8F33D4C4E27639

View file

@ -57,7 +57,7 @@ class Campaign < ApplicationRecord
has_many :donations
has_many :charges, through: :donations
has_many :payments, through: :donations
has_many :payments, { through: :donations, source: "payment" }
has_many :campaign_gift_options
has_many :campaign_gifts, through: :campaign_gift_options
has_many :supporters, :through => :donations