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:
parent
8d6d450303
commit
319107ae40
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue