Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- desc "Load development data"
- task :load_dev => :environment do
- require 'active_record/fixtures'
- ActiveRecord::Base.establish_connection(RAILS_ENV.to_sym)
- basepath = File.join(RAILS_ROOT, 'fixtures','dev')
- Dir.glob(File.join(basepath, '*.yml')).each do |fixture_file|
- puts "Loading fixtures %s" % fixture_file
- Fixtures.create_fixtures(basepath, File.basename(fixture_file, '.*'))
- end
- puts "Done"
- end
Add Comment
Please, Sign In to add comment