Sha256: 5fe904674341a2afac745b37c27ceb50362d3c5f3612615f45e3099e64ac089f

Contents?: true

Size: 762 Bytes

Versions: 12

Compression:

Stored size: 762 Bytes

Contents

namespace :db do
  desc "Initialize Defaults"
  task :initialize_defaults => :environment do
    puts "Clearing User and UserFavorite tables"
    User.destroy_all
    puts "Creating Someguy"
    User.create(:name => "Someguy", :favorites => "boats,fishing,boat-fishing", :email => 'skynet@mailinator.com')
    puts "Creating AnotherGuy"
    User.create(:name => "AnotherGuy", :favorites => "eating,sleeping,sleep-walking", :email => 'skynet@mailinator.com')
    puts "Creating YoMamma"
    User.create(:name => "YoMomma", :favorites => "kidding,joking,pining", :email => 'skynet@mailinator.com')
    puts "finished"
  end

  desc "Migrate Favorites"
  task :migrate_favorites => :environment do
    User.distributed_find(:all).map(:migrate_favorites)
  end

end

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
brendan-skynet-0.9.3.1 examples/rails_mysql_example/lib/tasks/rails_mysql_example.rake
brendan-skynet-0.9.3.2 examples/rails_mysql_example/lib/tasks/rails_mysql_example.rake
brendan-skynet-0.9.3.3 examples/rails_mysql_example/lib/tasks/rails_mysql_example.rake
brendan-skynet-0.9.3.5 examples/rails_mysql_example/lib/tasks/rails_mysql_example.rake
brendan-skynet-0.9.3.6 examples/rails_mysql_example/lib/tasks/rails_mysql_example.rake
brendan-skynet-0.9.3.7 examples/rails_mysql_example/lib/tasks/rails_mysql_example.rake
brendan-skynet-0.9.3.8 examples/rails_mysql_example/lib/tasks/rails_mysql_example.rake
brendan-skynet-0.9.31 examples/rails_mysql_example/lib/tasks/rails_mysql_example.rake
brendan-skynet-0.9.32 examples/rails_mysql_example/lib/tasks/rails_mysql_example.rake
brendan-skynet-0.9.33 examples/rails_mysql_example/lib/tasks/rails_mysql_example.rake
timocratic-skynet-0.9.4 examples/rails_mysql_example/lib/tasks/rails_mysql_example.rake
skynet-0.9.3 examples/rails_mysql_example/lib/tasks/rails_mysql_example.rake