From 0b1ea1beda14016ddca2d97ad07336989044c819 Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Fri, 22 Feb 2019 09:41:25 +0000 Subject: [PATCH] Rename VariantOverride.use_producer_settings to VariantOverride.use_producer_stock_settings --- app/models/variant_override.rb | 2 +- lib/open_food_network/scope_variant_to_hub.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/variant_override.rb b/app/models/variant_override.rb index 6b43822e6c..355a46d1db 100644 --- a/app/models/variant_override.rb +++ b/app/models/variant_override.rb @@ -62,7 +62,7 @@ class VariantOverride < ActiveRecord::Base count_on_hand.present? end - def use_producer_settings? + def use_producer_stock_settings? on_demand.nil? end diff --git a/lib/open_food_network/scope_variant_to_hub.rb b/lib/open_food_network/scope_variant_to_hub.rb index d838e253cb..a721505f7f 100644 --- a/lib/open_food_network/scope_variant_to_hub.rb +++ b/lib/open_food_network/scope_variant_to_hub.rb @@ -37,7 +37,7 @@ module OpenFoodNetwork end def on_demand - if @variant_override.present? && !@variant_override.use_producer_settings? + if @variant_override.present? && !@variant_override.use_producer_stock_settings? @variant_override.on_demand else super