Sha256: 86602296bf08e6d29498e8c0991d1b2e2cff2c0d0b6e7db00e6c27719fb5e694
Contents?: true
Size: 745 Bytes
Versions: 19
Compression:
Stored size: 745 Bytes
Contents
namespace :db do desc "Loads a schema.rb file into the database and then loads the initial database fixtures." task :bootstrap => ['db:schema:load', 'db:bootstrap:load'] namespace :bootstrap do desc "Load initial database fixtures (in db/bootstrap/*.yml) into the current environment's database. Load specific fixtures using FIXTURES=x,y" task :load => :environment do require 'active_record/fixtures' ActiveRecord::Base.establish_connection(RAILS_ENV.to_sym) (ENV['FIXTURES'] ? ENV['FIXTURES'].split(/,/) : Dir.glob(File.join(RAILS_ROOT, 'db', 'bootstrap', '*.{yml,csv}'))).each do |fixture_file| Fixtures.create_fixtures('db/bootstrap', File.basename(fixture_file, '.*')) end end end end
Version data entries
19 entries across 19 versions & 3 rubygems