mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Use type_condition method for hmt STI condition
This commit is contained in:
committed by
Jeremy Kemper
parent
e3523f1d33
commit
b3c9d53b34
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user