diff options
author | Tristan Gamilis <tristan@2suggestions.com.au> | 2015-04-09 14:53:15 +1000 |
---|---|---|
committer | Tristan Gamilis <tristan@2suggestions.com.au> | 2015-04-09 14:53:34 +1000 |
commit | 543523045112c5f5920c486e6fcf2d7e1ffedf5a (patch) | |
tree | dbf9081e9b0a8739b5eed5daea9af1ddefc5a19c /activerecord/test/models | |
parent | e0cb21f5f767606ad3ecf2db33855d27aa9f083d (diff) | |
download | rails-543523045112c5f5920c486e6fcf2d7e1ffedf5a.tar.gz rails-543523045112c5f5920c486e6fcf2d7e1ffedf5a.tar.bz2 rails-543523045112c5f5920c486e6fcf2d7e1ffedf5a.zip |
Add tests for associations without counter_cache
Assert that counter_cache behaviour is not used on belongs_to or
has_many associations if the option is not given explicitly.
Diffstat (limited to 'activerecord/test/models')
-rw-r--r-- | activerecord/test/models/treasure.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/models/treasure.rb b/activerecord/test/models/treasure.rb index ffc65466d5..63ff0c23ec 100644 --- a/activerecord/test/models/treasure.rb +++ b/activerecord/test/models/treasure.rb @@ -1,6 +1,7 @@ class Treasure < ActiveRecord::Base has_and_belongs_to_many :parrots belongs_to :looter, :polymorphic => true + # No counter_cache option given belongs_to :ship has_many :price_estimates, :as => :estimate_of |