Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Hide BelongsToAssociation#increment_counters and #decrement_counters

  • Loading branch information...
commit 7af987cf297efcb0a03a168ff9486c43e0b2ff97 1 parent d254341
Jean Boussier byroot authored
4 activerecord/lib/active_record/associations/belongs_to_association.rb
View
@@ -31,11 +31,11 @@ def updated?
@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
1  activerecord/lib/active_record/associations/builder/belongs_to.rb
View
@@ -29,7 +29,6 @@ def self.add_counter_cache_methods(mixin)
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
Please sign in to comment.
Something went wrong with that request. Please try again.