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

Migrations: report the number of rows affected when calling insert, update, delete, etc.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6945 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jeremy Kemper 2007-06-05 08:21:55 +00:00
parent 8d6d450303
commit 319107ae40

View file

@ -257,6 +257,7 @@ module ActiveRecord
result = nil
time = Benchmark.measure { result = yield }
say "%.4fs" % time.real, :subitem
say("#{result} rows", :subitem) if result.is_a?(Integer)
result
end