aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/associations/belongs_to_association.rb2
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