diff options
author | Jon Leighton <j@jonathanleighton.com> | 2010-12-31 18:36:02 +0000 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2010-12-31 20:00:44 +0000 |
commit | 3c400627eb9cfac380d716ccf1182d61db4a45a6 (patch) | |
tree | a1b2aef349f531c40b7d4145ba0d020bc1658eeb /activerecord/lib/active_record/associations | |
parent | bea4065d3c8c8f845ddda45b3ec98e3fb308d913 (diff) | |
download | rails-3c400627eb9cfac380d716ccf1182d61db4a45a6.tar.gz rails-3c400627eb9cfac380d716ccf1182d61db4a45a6.tar.bz2 rails-3c400627eb9cfac380d716ccf1182d61db4a45a6.zip |
Support for :counter_cache on polymorphic belongs_to
Diffstat (limited to 'activerecord/lib/active_record/associations')
-rw-r--r-- | activerecord/lib/active_record/associations/belongs_to_association.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/belongs_to_association.rb b/activerecord/lib/active_record/associations/belongs_to_association.rb index 6b29e3ef92..e4758f4369 100644 --- a/activerecord/lib/active_record/associations/belongs_to_association.rb +++ b/activerecord/lib/active_record/associations/belongs_to_association.rb @@ -46,7 +46,7 @@ module ActiveRecord if counter_cache_name && @owner.persisted? && different_target?(record) if record - target_klass.increment_counter(counter_cache_name, record.id) + record.class.increment_counter(counter_cache_name, record.id) end if foreign_key_present |