Use type_condition method for hmt STI condition

This commit is contained in:
Tarmo Tänav
2008-06-02 16:48:06 +03:00
committed by Jeremy Kemper
parent e3523f1d33
commit b3c9d53b34

View File

@@ -237,7 +237,7 @@ module ActiveRecord
end
def build_sti_condition
"#{@reflection.through_reflection.quoted_table_name}.#{@reflection.through_reflection.klass.inheritance_column} = #{@reflection.klass.quote_value(@reflection.through_reflection.klass.sti_name)}"
@reflection.through_reflection.klass.send(:type_condition)
end
alias_method :sql_conditions, :conditions