Orbit/db/seeds.rb

49 lines
846 B
Ruby

require 'factory_girl'
require 'faker'
FactoryGirl.definition_file_paths = Dir["#{Rails.root}/vendor/built_in_modules/*/spec/factories"]
FactoryGirl.find_definitions
CoAuthorRelation.destroy_all
CoAuthor.destroy_all
JournalLevelType.destroy_all
WritingJournalFile.destroy_all
WritingJournal.destroy_all
#Dir[Rails.root.join("spec/factories/*.rb")].each {|f| require f}
10.size.times do
FactoryGirl.create(:journal_level)
end
10.times do
FactoryGirl.create(:journal_relation)
end
50.times do
FactoryGirl.create(:journal)
end
50.times do
FactoryGirl.create(:journal_co_author)
end
10.size.times do
FactoryGirl.create(:conference_level)
end
10.times do
FactoryGirl.create(:conference_relation)
end
50.times do
FactoryGirl.create(:conference)
end
50.times do
FactoryGirl.create(:conference_co_author)
end
puts "Success!"