debian-mirror-gitlab/config/initializers/0_acts_as_taggable.rb
2021-03-11 19:13:27 +05:30

12 lines
465 B
Ruby

# frozen_string_literal: true
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
# validate that counter cache is disabled
raise "Counter cache is not disabled" if
ActsAsTaggableOn::Tagging.reflections["tag"].options[:counter_cache]