Files
openfoodnetwork/db/seeds.rb
2012-06-09 14:41:09 +10:00

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'])