Files
openfoodnetwork/app/services/default_stock_location.rb
Maikel Linke 392aeb7321 Remove unused method loading default country
And another unused method.
2022-11-02 16:21:15 +11:00

12 lines
346 B
Ruby

# frozen_string_literal: true
# Encapsulates the concept of default stock location that OFN has, as explained
# in https://github.com/openfoodfoundation/openfoodnetwork/wiki/Spree-Upgrade%3A-Stock-locations
class DefaultStockLocation
NAME = 'default'
def self.find_or_create
Spree::StockLocation.find_or_create_by(name: NAME)
end
end