mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
14 lines
326 B
Ruby
14 lines
326 B
Ruby
# Encapsulates the concept of default stock location in creation of a product or a shipping method.
|
|
|
|
class DefaultShippingCategory
|
|
NAME = 'Default'.freeze
|
|
|
|
def self.create!
|
|
Spree::ShippingCategory.create!(name: NAME)
|
|
end
|
|
|
|
def self.find_or_create
|
|
Spree::ShippingCategory.find_or_create_by(name: NAME)
|
|
end
|
|
end
|