1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

rephrase how the verbose methods in a migration work

This commit is contained in:
Vijay Dev 2011-08-14 20:15:51 +05:30
parent 3c5715575d
commit ac4dc5e240

View file

@ -471,8 +471,8 @@ By default migrations tell you exactly what they're doing and how long it took.
Several methods are provided that allow you to control all this:
* +suppress_messages+ suppresses any output generated by its block
* +say+ outputs text (the second argument controls whether it is indented or not)
* +suppress_messages+ takes a block as an argument and suppresses any output generated by the block.
* +say+ takes a message argument and outputs it as is. A second boolean argument can be passed to specify whether to indent or not.
* +say_with_time+ outputs text along with how long it took to run its block. If the block returns an integer it assumes it is the number of rows affected.
For example, this migration
@ -510,7 +510,7 @@ generates the following output
20080906170109 CreateProducts: migrated (10.0097s)
</shell>
If you just want Active Record to shut up then running +rake db:migrate VERBOSE=false+ will suppress any output.
If you just want Active Record to shut up then running +rake db:migrate VERBOSE=false+ will suppress all output.
h3. Using Models in Your Migrations