Skip to content

Instantly share code, notes, and snippets.

@chyld
Created August 24, 2012 18:41
Show Gist options
  • Save chyld/3454133 to your computer and use it in GitHub Desktop.
Save chyld/3454133 to your computer and use it in GitHub Desktop.
Creating a rake task
namespace :chyld do
desc 'Populate database'
task :populate => [:environment] do
Song.create(:name => "S1", :album_name => "A1")
Song.create(:name => "S2", :album_name => "A2")
Song.create(:name => "S3", :album_name => "A3")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment