Add table name to condition so it doesnt cause trouble in the future if mixed with other tables in the same query

This commit is contained in:
Luis Ramos
2020-05-18 10:55:03 +01:00
parent 0a6bd1424c
commit 37350fcbb0

View File

@@ -30,7 +30,7 @@ Spree::ShippingMethod.class_eval do
}
scope :by_name, -> { order('spree_shipping_methods.name ASC') }
scope :display_on_checkout, -> { where("display_on is null OR display_on = ''") }
scope :display_on_checkout, -> { where("spree_shipping_methods.display_on is null OR spree_shipping_methods.display_on = ''") }
# Return the services (pickup, delivery) that different distributors provide, in the format:
# {distributor_id => {pickup: true, delivery: false}, ...}