Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace :seed_data do
- desc 'Load seed data into the database of the current environment'
- task :load => :environment do
- require 'active_record/fixtures'
- Dir.glob(RAILS_ROOT + '/db/seed_data/*.yml').each do |file|
- Fixtures.create_fixtures('db/seed_data', File.basename(file, '.*'))
- end
- end
- end
Add Comment
Please, Sign In to add comment