|
@ -7,9 +7,8 @@ |
|
|
# Mayor.create(name: 'Emanuel', city: cities.first) |
|
|
# Mayor.create(name: 'Emanuel', city: cities.first) |
|
|
require 'active_record/fixtures' |
|
|
require 'active_record/fixtures' |
|
|
|
|
|
|
|
|
Dir.glob(File.join(Rails.root, 'test', 'fixtures', '**/*.{yml,csv}')).each do |fixture_file, something| |
|
|
#Load defaults from db/seed/fixtures |
|
|
puts fixture_file |
|
|
Dir.glob(File.join(Rails.root, 'db', 'seed', 'fixtures', '**', '*.{yml,csv}')).each do |fixture_file, something| |
|
|
puts File.dirname(fixture_file) |
|
|
|
|
|
ActiveRecord::Fixtures.create_fixtures(File.dirname(fixture_file), File.basename(fixture_file, '.*')) |
|
|
ActiveRecord::Fixtures.create_fixtures(File.dirname(fixture_file), File.basename(fixture_file, '.*')) |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|