Permalink
Browse files

Move add_counter_cache_methods to class level

  • Loading branch information...
1 parent bfa8249 commit cae842e662bbf6d6e6c87857d6ab68a982b1663f @rafaelfranca rafaelfranca committed Oct 9, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/associations/builder/belongs_to.rb
@@ -20,12 +20,12 @@ def self.define_callbacks(model, reflection)
def define_accessors(mixin, reflection)
super
- add_counter_cache_methods mixin
+ self.class.add_counter_cache_methods mixin
end
private
- def add_counter_cache_methods(mixin)
+ def self.add_counter_cache_methods(mixin)
return if mixin.method_defined? :belongs_to_counter_cache_after_create
mixin.class_eval do

0 comments on commit cae842e

Please sign in to comment.