From 929668638409d5eb4bd2cfa0c6e890ba774cb633 Mon Sep 17 00:00:00 2001 From: Cillian O'Ruanaidh Date: Fri, 17 Jun 2022 11:04:26 +0100 Subject: [PATCH] Make backend, frontend scopes on Spree::ShippingMethod neater Co-authored-by: Co-authored-by: Maikel --- app/models/spree/shipping_method.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/spree/shipping_method.rb b/app/models/spree/shipping_method.rb index b7bd7e4092..ad1f831fa8 100644 --- a/app/models/spree/shipping_method.rb +++ b/app/models/spree/shipping_method.rb @@ -106,11 +106,11 @@ module Spree end def self.backend - where("spree_shipping_methods.display_on = ?", DISPLAY_ON_OPTIONS[:back_end]) + where(display_on: DISPLAY_ON_OPTIONS[:back_end]) end def self.frontend - where("spree_shipping_methods.display_on IS NULL OR spree_shipping_methods.display_on = ''") + where(display_on: [nil, ""]) end private