aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/schema
diff options
context:
space:
mode:
authorTristan Gamilis <tristan@2suggestions.com.au>2015-04-09 14:53:15 +1000
committerTristan Gamilis <tristan@2suggestions.com.au>2015-04-09 14:53:34 +1000
commit543523045112c5f5920c486e6fcf2d7e1ffedf5a (patch)
treedbf9081e9b0a8739b5eed5daea9af1ddefc5a19c /activerecord/test/schema
parente0cb21f5f767606ad3ecf2db33855d27aa9f083d (diff)
downloadrails-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/schema')
-rw-r--r--activerecord/test/schema/schema.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb
index 7b42f8a4a5..9b03c78a46 100644
--- a/activerecord/test/schema/schema.rb
+++ b/activerecord/test/schema/schema.rb
@@ -671,6 +671,8 @@ ActiveRecord::Schema.define do
t.string :name
t.integer :pirate_id
t.integer :update_only_pirate_id
+ # Conventionally named column for counter_cache
+ t.integer :treasures_count, default: 0
t.datetime :created_at
t.datetime :created_on
t.datetime :updated_at