mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-07 03:01:33 +00:00
9 lines
264 B
Ruby
9 lines
264 B
Ruby
class VariantOverride < ActiveRecord::Base
|
|
belongs_to :variant, class_name: 'Spree::Variant'
|
|
belongs_to :hub, class_name: 'Enterprise'
|
|
|
|
def self.price_for(variant, hub)
|
|
VariantOverride.where(variant_id: variant, hub_id: hub).first.andand.price
|
|
end
|
|
end
|