diff options
author | Eugene Kenny <elkenny@gmail.com> | 2018-01-14 20:46:19 +0000 |
---|---|---|
committer | Eugene Kenny <elkenny@gmail.com> | 2018-01-14 20:46:19 +0000 |
commit | 3e71bc4b048bef2ae7723dde5082020fd984bbd6 (patch) | |
tree | 988395bcd199720560661a316b8c2ee99b44c984 /activerecord/test/schema | |
parent | fd04c8cbb6627ef65ea728b5026b21bd24471c18 (diff) | |
download | rails-3e71bc4b048bef2ae7723dde5082020fd984bbd6.tar.gz rails-3e71bc4b048bef2ae7723dde5082020fd984bbd6.tar.bz2 rails-3e71bc4b048bef2ae7723dde5082020fd984bbd6.zip |
Don't update counter cache when through record was not destroyed
When removing a record from a has many through association, the counter
cache was being updated even if the through record halted the callback
chain and prevented itself from being destroyed.
Diffstat (limited to 'activerecord/test/schema')
-rw-r--r-- | activerecord/test/schema/schema.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb index 3205c4c20a..7d008eecd5 100644 --- a/activerecord/test/schema/schema.rb +++ b/activerecord/test/schema/schema.rb @@ -690,6 +690,7 @@ ActiveRecord::Schema.define do t.integer :taggings_with_delete_all_count, default: 0 t.integer :taggings_with_destroy_count, default: 0 t.integer :tags_count, default: 0 + t.integer :indestructible_tags_count, default: 0 t.integer :tags_with_destroy_count, default: 0 t.integer :tags_with_nullify_count, default: 0 end @@ -847,6 +848,7 @@ ActiveRecord::Schema.define do t.column :taggable_type, :string t.column :taggable_id, :integer t.string :comment + t.string :type end create_table :tasks, force: true do |t| |