Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use type_condition method for hmt STI condition

  • Loading branch information...
commit b3c9d53b348f586ed223ec5de9f525faee6f564d 1 parent e3523f1
@tarmo tarmo authored jeremy committed
View
2  activerecord/lib/active_record/associations/has_many_through_association.rb
@@ -237,7 +237,7 @@ def build_through_conditions
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
Please sign in to comment.
Something went wrong with that request. Please try again.