Skip to content

Instantly share code, notes, and snippets.

@kt103099
Created April 24, 2009 00:03
Show Gist options
  • Save kt103099/100851 to your computer and use it in GitHub Desktop.
Save kt103099/100851 to your computer and use it in GitHub Desktop.
namespace :db do
desc "Load seed fixtures (from db/fixtures) into the current environment's database."
task :seed => :environment do
require 'active_record/fixtures'
Dir.glob(RAILS_ROOT + '/db/fixtures/*.yml').each do |file|
Fixtures.create_fixtures('db/fixtures', File.basename(file, '.*'))
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment