rails/rails — pull request #13507 by aayushkhandelwal11 (2013-12-27 13:01:52+00:00)
Title: Modifying empty? method of errors

earlier
puts Benchmark.measure { p u.errors.empty? }
true
0.000000 0.000000 0.000000 ( 0.000085)

Now if rather than calling empty? we call values.flatten.empty?
puts Benchmark.measure { p u.errors.values.flatten.empty? }
true
0.000000 0.000000 0.000000 ( 0.000036)