From 3b677aa0060ca70f7589c708b92d61648e9157eb Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Sat, 8 Jan 2011 19:59:31 -0800 Subject: use select_all because not all database adapters support bind values --- activerecord/lib/active_record/relation/finder_methods.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb index aa9d468bba..e447de92a4 100644 --- a/activerecord/lib/active_record/relation/finder_methods.rb +++ b/activerecord/lib/active_record/relation/finder_methods.rb @@ -189,7 +189,7 @@ module ActiveRecord including = (@eager_load_values + @includes_values).uniq join_dependency = ActiveRecord::Associations::ClassMethods::JoinDependency.new(@klass, including, []) relation = construct_relation_for_association_find(join_dependency) - rows = connection.exec_query(relation.to_sql, 'SQL', relation.bind_values) + rows = connection.select_all(relation.to_sql, 'SQL', relation.bind_values) join_dependency.instantiate(rows) rescue ThrowResult [] -- cgit v1.2.3