debian-mirror-gitlab/config/initializers/0_acts_as_taggable.rb

10 lines
434 B
Ruby
Raw Normal View History

2017-08-17 22:00:37 +05:30
ActsAsTaggableOn.strict_case_match = true
# 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
ActsAsTaggableOn.tags_counter = false
2017-09-10 17:25:29 +05:30
# validate that counter cache is disabled
2018-03-17 18:26:18 +05:30
raise "Counter cache is not disabled" if
2017-09-10 17:25:29 +05:30
ActsAsTaggableOn::Tagging.reflections["tag"].options[:counter_cache]