public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Use type_condition method for hmt STI condition
Tarmo Tänav (author)
Mon Jun 02 06:48:06 -0700 2008
jeremy (committer)
Fri Aug 15 15:57:33 -0700 2008
commit  b3c9d53b348f586ed223ec5de9f525faee6f564d
tree    5f663b37aa9088b8315051aaa863e5818eb8b4bf
parent  e3523f1d33c3cf53f1a65e520be5e937e9c68c1d
...
237
238
239
240
 
241
242
243
...
237
238
239
 
240
241
242
243
0
@@ -237,7 +237,7 @@ module ActiveRecord
0
         end
0
         
0
         def build_sti_condition
0
-          "#{@reflection.through_reflection.quoted_table_name}.#{@reflection.through_reflection.klass.inheritance_column} = #{@reflection.klass.quote_value(@reflection.through_reflection.klass.sti_name)}"
0
+          @reflection.through_reflection.klass.send(:type_condition)
0
         end
0
 
0
         alias_method :sql_conditions, :conditions

Comments