diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-17 10:23:13 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-17 10:23:56 -0800 |
commit | 57f73a6bcf3311262172f1f348a1be614596b41a (patch) | |
tree | 3b08bf5397cb680f0b20846a8aec3668ea1813dd /activerecord/test/models/dog.rb | |
parent | 5812c35b881d9f6bca3bae92bb4ab7652f8c40ad (diff) | |
download | rails-57f73a6bcf3311262172f1f348a1be614596b41a.tar.gz rails-57f73a6bcf3311262172f1f348a1be614596b41a.tar.bz2 rails-57f73a6bcf3311262172f1f348a1be614596b41a.zip |
Merge pull request #4487 from sarenji/fix-reset-counters
Fix bug where reset_counters resets the wrong counter cache.
Diffstat (limited to 'activerecord/test/models/dog.rb')
-rw-r--r-- | activerecord/test/models/dog.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/models/dog.rb b/activerecord/test/models/dog.rb new file mode 100644 index 0000000000..72b7d33a86 --- /dev/null +++ b/activerecord/test/models/dog.rb @@ -0,0 +1,4 @@ +class Dog < ActiveRecord::Base + belongs_to :breeder, :class_name => "DogLover", :counter_cache => :bred_dogs_count + belongs_to :trainer, :class_name => "DogLover", :counter_cache => :trained_dogs_count +end |