Created
December 5, 2013 18:39
-
-
Save paulbaker3/7810855 to your computer and use it in GitHub Desktop.
Creates a set of custom rake tasks. Place this in a file in {app_root}/lib/tasks/<file_name>.rake Invoke the custom_demo_data task from the command line as => rake populate:custom_demo_data COMPANY="Foo Bar Inc"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :populate do | |
desc "Populates the production database with demo data to support sales" | |
task :generic_demo_data do | |
puts "populating the database with demo data" | |
end | |
desc "Populates the production database with test data for manual testing" | |
task :test_data do | |
puts "populating the database with test data" | |
end | |
desc "Populates the production database with demo data for a specific sales lead" | |
task :custom_demo_data => :environment do | |
puts "populating the database with demo data for #{ENV['COMPANY']}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment