Commit bd259d6b authored by Stan Hu's avatar Stan Hu

Merge branch 'fix-counter-cache-for-acts-as-taggable' into 'master'

Fix Counter Cache not being disabled for acts-on-taggable

Closes #30582

See merge request !11727
parents 2eb3a405 9d40646a
---
title: Fix counter cache for acts as taggable
merge_request:
author:
...@@ -3,3 +3,7 @@ ActsAsTaggableOn.strict_case_match = true ...@@ -3,3 +3,7 @@ ActsAsTaggableOn.strict_case_match = true
# tags_counter enables caching count of tags which results in an update whenever a tag is added or removed # tags_counter enables caching count of tags which results in an update whenever a tag is added or removed
# since the count is not used anywhere its better performance wise to disable this cache # since the count is not used anywhere its better performance wise to disable this cache
ActsAsTaggableOn.tags_counter = false ActsAsTaggableOn.tags_counter = false
# validate that counter cache is disabled
raise "Counter cache is not disabled" if
ActsAsTaggableOn::Tagging.reflections["tag"].options[:counter_cache]
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment