Make backend, frontend scopes on Spree::ShippingMethod neater

Co-authored-by: Co-authored-by: Maikel <maikel@email.org.au>
This commit is contained in:
Cillian O'Ruanaidh
2022-06-17 11:04:26 +01:00
committed by Filipe
parent f6c754839b
commit 9296686384

View File

@@ -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