Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 319107ae40bc00772f4eaf91ab9531097bc537cb 1 parent 8d6d450
@jeremy jeremy authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  activerecord/lib/active_record/migration.rb
View
1  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
Please sign in to comment.
Something went wrong with that request. Please try again.