summaryrefslogtreecommitdiff
path: root/config/initializers/0_acts_as_taggable.rb
blob: 9a92b8f2d18ed06d64702284b8bb5a9e223958fd (plain)
1
2
3
4
5
6
7
8
9
10
11
# 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]