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

stop using deprecated methods in arel

This commit is contained in:
Aaron Patterson 2011-04-11 15:49:37 -07:00
parent d1575ae1b9
commit b53ffb35e0

View file

@ -352,8 +352,8 @@ module ActiveRecord
if result.size == expected_size
result
else
conditions = arel.wheres.map { |x| x.value }.join(', ')
conditions = " [WHERE #{conditions}]" if conditions.present?
conditions = arel.where_sql
conditions = " [#{conditions}]" if conditions
error = "Couldn't find all #{@klass.name.pluralize} with IDs "
error << "(#{ids.join(", ")})#{conditions} (found #{result.size} results, but was looking for #{expected_size})"