mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-26 01:33:22 +00:00
Make backend, frontend scopes on Spree::ShippingMethod neater
Co-authored-by: Co-authored-by: Maikel <maikel@email.org.au>
This commit is contained in:
committed by
Filipe
parent
f6c754839b
commit
9296686384
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user