aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/test_unit/observer
diff options
context:
space:
mode:
authorschneems <richard.schneeman@gmail.com>2012-10-09 11:24:36 -1000
committerschneems <richard.schneeman@gmail.com>2012-10-12 13:08:10 -1000
commit20385ec6b16f1bb8158a3d087d1298a8f23a19e4 (patch)
tree4ddf4f60472ce2cc1cb597c50bd38ee43d1f7456 /railties/lib/rails/generators/test_unit/observer
parent9492cb025735c6e90d114f5681384c5119049051 (diff)
downloadrails-20385ec6b16f1bb8158a3d087d1298a8f23a19e4.tar.gz
rails-20385ec6b16f1bb8158a3d087d1298a8f23a19e4.tar.bz2
rails-20385ec6b16f1bb8158a3d087d1298a8f23a19e4.zip
Prompt to run rake when accidentally typed rails
Developers from all levels will accidentally run rake tasks using the `rails` keyword when they meant to use `rake`. Often times beginners struggle with the difference between the tools. The most common example would be `$ rails db:migrate` Rather than telling the developer simply that they did not use a valid rails command, we can see if it was a valid rake command first. If it is a valid rake command we can auto execute it giving the user a period of time to cancel if that isn't what they intended. Here is what `rake db:migrate` would look like if you cancel the command: ```sh $ rails db:migrate Assuming you meant: $ rake db:migrate press any key to cancel in 3 seconds > command terminated ... ``` Here is what it looks like if you don't cancel the command: ```sh $ rails db:migrate Assuming you meant: $ rake db:migrate press any key to cancel in 3 seconds > Running: $ rake db:migrate == Foo: migrating ============================================================ == Foo: migrated (0.0000s) =================================================== ```
Diffstat (limited to 'railties/lib/rails/generators/test_unit/observer')
0 files changed, 0 insertions, 0 deletions