mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-04 22:16:08 +00:00
13 lines
585 B
Ruby
13 lines
585 B
Ruby
# This file should contain all the record creation needed to seed the database with its default values.
|
|
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
|
|
#
|
|
# Examples:
|
|
#
|
|
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
|
|
# Mayor.create(name: 'Emanuel', city: cities.first)
|
|
|
|
|
|
Spree::Core::Engine.load_seed if defined?(Spree::Core)
|
|
Spree::Auth::Engine.load_seed if defined?(Spree::Auth)
|
|
default_path = File.join(File.dirname(__FILE__), 'default')
|
|
ActiveRecord::Fixtures.create_fixtures(default_path, ['spree/states']) |