aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2014-04-15 14:21:35 -0400
committerJean Boussier <jean.boussier@gmail.com>2014-04-15 14:35:02 -0400
commit7af987cf297efcb0a03a168ff9486c43e0b2ff97 (patch)
treebb99d7de4b7fb93f1b3b6a380365cffb7bad6008 /activerecord/lib/active_record/associations
parentd2543412ff42d64c5fc5d763336b3f3ec9ab8eda (diff)
downloadrails-7af987cf297efcb0a03a168ff9486c43e0b2ff97.tar.gz
rails-7af987cf297efcb0a03a168ff9486c43e0b2ff97.tar.bz2
rails-7af987cf297efcb0a03a168ff9486c43e0b2ff97.zip
Hide BelongsToAssociation#increment_counters and #decrement_counters
Diffstat (limited to 'activerecord/lib/active_record/associations')
-rw-r--r--activerecord/lib/active_record/associations/belongs_to_association.rb4
-rw-r--r--activerecord/lib/active_record/associations/builder/belongs_to.rb1
2 files changed, 2 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/associations/belongs_to_association.rb b/activerecord/lib/active_record/associations/belongs_to_association.rb
index b0820f662a..1edd4fa3aa 100644
--- a/activerecord/lib/active_record/associations/belongs_to_association.rb
+++ b/activerecord/lib/active_record/associations/belongs_to_association.rb
@@ -31,11 +31,11 @@ module ActiveRecord
@updated
end
- def decrement_counters
+ def decrement_counters # :nodoc:
with_cache_name { |name| decrement_counter name }
end
- def increment_counters
+ def increment_counters # :nodoc:
with_cache_name { |name| increment_counter name }
end
diff --git a/activerecord/lib/active_record/associations/builder/belongs_to.rb b/activerecord/lib/active_record/associations/builder/belongs_to.rb
index 7614fdd97f..47cc1f4b34 100644
--- a/activerecord/lib/active_record/associations/builder/belongs_to.rb
+++ b/activerecord/lib/active_record/associations/builder/belongs_to.rb
@@ -29,7 +29,6 @@ module ActiveRecord::Associations::Builder
return if mixin.method_defined? :belongs_to_counter_cache_after_update
mixin.class_eval do
-
def belongs_to_counter_cache_after_update(reflection)
foreign_key = reflection.foreign_key
cache_column = reflection.counter_cache_column