From 543523045112c5f5920c486e6fcf2d7e1ffedf5a Mon Sep 17 00:00:00 2001 From: Tristan Gamilis Date: Thu, 9 Apr 2015 14:53:15 +1000 Subject: 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. --- activerecord/test/schema/schema.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activerecord/test/schema') 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 -- cgit v1.2.3