aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorFoliosus <foliosus@foliosus.com>2008-11-18 09:32:48 -0800
committerMichael Koziarski <michael@koziarski.com>2008-12-01 20:00:19 +0100
commit0c4ba90aa1ea6a8d386c724a55a31e63a13c46ab (patch)
treed636c370cddad0b24e282d474094c96d65d6307f /activerecord/lib/active_record
parentdab78e55cfcc111b898a1c2475c0c5c327db30f9 (diff)
downloadrails-0c4ba90aa1ea6a8d386c724a55a31e63a13c46ab.tar.gz
rails-0c4ba90aa1ea6a8d386c724a55a31e63a13c46ab.tar.bz2
rails-0c4ba90aa1ea6a8d386c724a55a31e63a13c46ab.zip
Removed extra 'as' in :joins clause for habtm preloading
Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1405 state:committed]
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/association_preload.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/association_preload.rb b/activerecord/lib/active_record/association_preload.rb
index 69300e5ce5..99c3ce5e62 100644
--- a/activerecord/lib/active_record/association_preload.rb
+++ b/activerecord/lib/active_record/association_preload.rb
@@ -185,7 +185,7 @@ module ActiveRecord
associated_records = reflection.klass.find(:all, :conditions => [conditions, ids],
:include => options[:include],
- :joins => "INNER JOIN #{connection.quote_table_name options[:join_table]} as t0 ON #{reflection.klass.quoted_table_name}.#{reflection.klass.primary_key} = t0.#{reflection.association_foreign_key}",
+ :joins => "INNER JOIN #{connection.quote_table_name options[:join_table]} t0 ON #{reflection.klass.quoted_table_name}.#{reflection.klass.primary_key} = t0.#{reflection.association_foreign_key}",
:select => "#{options[:select] || table_name+'.*'}, t0.#{reflection.primary_key_name} as the_parent_record_id",
:order => options[:order])