Browse files

pass arel to select_all rather than depend on method_missing

  • Loading branch information...
1 parent 4b6886a commit 8004c91eb67b5d690a4eb8ed4ee475a6d2dc0d6c @tenderlove tenderlove committed Jul 9, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/relation/finder_methods.rb
View
2 activerecord/lib/active_record/relation/finder_methods.rb
@@ -246,7 +246,7 @@ def find_with_associations
if ActiveRecord::NullRelation === relation
[]
else
- rows = connection.select_all(relation, 'SQL', relation.bind_values.dup)
+ rows = connection.select_all(relation.arel, 'SQL', relation.bind_values.dup)
join_dependency.instantiate(rows)
end
end

0 comments on commit 8004c91

Please sign in to comment.