mirror of
https://github.com/github/rails.git
synced 2026-01-30 00:38:00 -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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user