aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorTarmo Tänav <tarmo@itech.ee>2008-06-02 16:48:06 +0300
committerJeremy Kemper <jeremy@bitsweat.net>2008-08-15 15:57:33 -0700
commitb3c9d53b348f586ed223ec5de9f525faee6f564d (patch)
tree5f663b37aa9088b8315051aaa863e5818eb8b4bf /activerecord/lib/active_record
parente3523f1d33c3cf53f1a65e520be5e937e9c68c1d (diff)
downloadrails-b3c9d53b348f586ed223ec5de9f525faee6f564d.tar.gz
rails-b3c9d53b348f586ed223ec5de9f525faee6f564d.tar.bz2
rails-b3c9d53b348f586ed223ec5de9f525faee6f564d.zip
Use type_condition method for hmt STI condition
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/associations/has_many_through_association.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/has_many_through_association.rb b/activerecord/lib/active_record/associations/has_many_through_association.rb
index e1bfff5923..24b02efc35 100644
--- a/activerecord/lib/active_record/associations/has_many_through_association.rb
+++ b/activerecord/lib/active_record/associations/has_many_through_association.rb
@@ -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