Class: Spree::Seeds::Stores
- Inherits:
-
Object
- Object
- Spree::Seeds::Stores
- Includes:
- Spree::ServiceModule::Base
- Defined in:
- app/services/spree/seeds/stores.rb
Instance Method Summary collapse
Methods included from Spree::ServiceModule::Base
Instance Method Details
#call ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/services/spree/seeds/stores.rb', line 6 def call return if Spree::Store.where(default: true).exists? Spree::Store.new do |s| s.name = 'Shop' s.code = 'shop' s.url = Rails.application.routes.[:host] || 'localhost:3000' s.mail_from_address = 'no-reply@example.com' s.customer_support_email = 'support@example.com' s.default_currency = 'USD' s.default_country_iso = 'US' s.default_locale = I18n.locale end.save! end |