aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-12-25 16:38:59 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-12-25 16:38:59 -0700
commit75ac9c4271df65b94b2a6862d87b1ec42f676efe (patch)
tree711fc6b6e089812b341aec048c41a77ec85ea199 /activerecord
parent33b5a2637fbed8b2e5a10b84b79b32245edfb411 (diff)
downloadrails-75ac9c4271df65b94b2a6862d87b1ec42f676efe.tar.gz
rails-75ac9c4271df65b94b2a6862d87b1ec42f676efe.tar.bz2
rails-75ac9c4271df65b94b2a6862d87b1ec42f676efe.zip
use arel to determine selection column
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/association_preload.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/association_preload.rb b/activerecord/lib/active_record/association_preload.rb
index 5feda5db0c..3409ca9099 100644
--- a/activerecord/lib/active_record/association_preload.rb
+++ b/activerecord/lib/active_record/association_preload.rb
@@ -378,7 +378,6 @@ module ActiveRecord
def find_associated_records(ids, reflection, preload_options)
options = reflection.options
table = reflection.klass.arel_table
- table_name = reflection.klass.quoted_table_name
conditions = []
@@ -392,7 +391,7 @@ module ActiveRecord
conditions += append_conditions(reflection, preload_options)
find_options = {
- :select => preload_options[:select] || options[:select] || Arel.sql("#{table_name}.*"),
+ :select => preload_options[:select] || options[:select] || table[Arel.star],
:include => preload_options[:include] || options[:include],
:joins => options[:joins],
:group => preload_options[:group] || options[:group],