public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Removed extra 'as' in :joins clause for habtm preloading

Signed-off-by: Michael Koziarski <michael@koziarski.com>

[#1405 state:committed]
foliosus (author)
Tue Nov 18 09:32:48 -0800 2008
NZKoz (committer)
Mon Dec 01 11:00:19 -0800 2008
commit  0c4ba90aa1ea6a8d386c724a55a31e63a13c46ab
tree    d636c370cddad0b24e282d474094c96d65d6307f
parent  dab78e55cfcc111b898a1c2475c0c5c327db30f9
...
185
186
187
188
 
189
190
191
...
185
186
187
 
188
189
190
191
0
@@ -185,7 +185,7 @@ module ActiveRecord
0
 
0
         associated_records = reflection.klass.find(:all, :conditions => [conditions, ids],
0
         :include => options[:include],
0
-        :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}",
0
+        :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}",
0
         :select => "#{options[:select] || table_name+'.*'}, t0.#{reflection.primary_key_name} as the_parent_record_id",
0
         :order => options[:order])
0
 

Comments