Permalink
Browse files

Migrations: report the number of rows affected when calling insert, u…

…pdate, delete, etc.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6945 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 8d6d450 commit 319107ae40bc00772f4eaf91ab9531097bc537cb @jeremy jeremy committed Jun 5, 2007
Showing with 1 addition and 0 deletions.
  1. +1 −0 activerecord/lib/active_record/migration.rb
@@ -257,6 +257,7 @@ def say_with_time(message)
result = nil
time = Benchmark.measure { result = yield }
say "%.4fs" % time.real, :subitem
+ say("#{result} rows", :subitem) if result.is_a?(Integer)
result
end

0 comments on commit 319107a

Please sign in to comment.