Ensure that all PaymentMethod-derived classes also allow distributor_id

This commit is contained in:
David Cook
2013-08-12 14:02:55 +10:00
parent 725766d82e
commit 6c4ace8d14

View File

@@ -13,4 +13,9 @@ Spree::PaymentMethod.class_eval do
where('distributor_id IN (?)', user.enterprises.map {|enterprise| enterprise.id })
end
}
end
# Ensure that all derived classes also allow distributor_id
Spree::Gateway.providers.each do |p|
p.attr_accessible :distributor_id
end