1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

sort insert columns for better cache hits

This commit is contained in:
Aaron Patterson 2011-04-14 14:26:57 -07:00
parent 199c0bb338
commit 9951af0289

View file

@ -50,7 +50,7 @@ module ActiveRecord
conn = @klass.connection
substitutes = values.to_a
substitutes = values.sort_by { |arel_attr,_| arel_attr.name }
binds = substitutes.map do |arel_attr, value|
[@klass.columns_hash[arel_attr.name], value]
end