diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-01-08 19:59:31 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-01-08 19:59:31 -0800 |
commit | 3b677aa0060ca70f7589c708b92d61648e9157eb (patch) | |
tree | d4cf492816d25e870bc5cbfd1049f6a303e51422 | |
parent | ec960c3730ed34b3163a267b665daf6d7d024028 (diff) | |
download | rails-3b677aa0060ca70f7589c708b92d61648e9157eb.tar.gz rails-3b677aa0060ca70f7589c708b92d61648e9157eb.tar.bz2 rails-3b677aa0060ca70f7589c708b92d61648e9157eb.zip |
use select_all because not all database adapters support bind values
-rw-r--r-- | activerecord/lib/active_record/relation/finder_methods.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 [] |