Sha256: 2501edf4db3e6764f3b20d6c9e852d0eecf4bced1e00c9ad96034cf82d420ad8

Contents?: true

Size: 592 Bytes

Versions: 2

Compression:

Stored size: 592 Bytes

Contents

namespace :db do

  namespace :development do
    
    desc "Run all seeds for development"
    task :seed => :environment do
      Rake::Task["db:abort_if_pending_migrations"].invoke
      Rake::Task["db:seed"].invoke
      load NamedSeeds::Railtie.send(:seed_file)
    end

  end

  namespace :test do
    
    desc "Run the seed data from db/test/seeds.rb"
    task :seed => :environment do
      Rake::Task["db:abort_if_pending_migrations"].invoke
      NamedSeeds::Railtie.load_seed
    end

  end

end

task 'db:setup'     => 'db:development:seed'
task 'test:prepare' => 'db:test:seed'

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
named_seeds-1.0.5 lib/named_seeds/railties/databases.rake
named_seeds-1.0.4 lib/named_seeds/railties/databases.rake