Last active
December 26, 2015 12:09
-
-
Save TGOlson/7149515 to your computer and use it in GitHub Desktop.
Speed up the process
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
desc "load all files in app/models to irb" | |
task :console do | |
file_list = Dir[File.dirname(__FILE__) + "/app/models/*.rb"].map { |f| "-r #{f}" } | |
exec "irb #{file_list.join(' ')}" | |
end | |
desc "generate new migration file" | |
task :generate do | |
timestamp = Time.now.strftime('%Y%m%d%H%M%S') | |
exec "touch db/migrate/#{timestamp}_#{ARGV.last}.rb" | |
end | |
# $ rake generate migration add_column_people ('migration' portion is optional) | |
# => 20131024214106_add_column_people.rb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment