Add initializer included in acts-as-taggable-on 10.0.0

Similar to what we do with other gems, we add the commented code.
This commit is contained in:
Javi Martín
2024-03-19 21:16:06 +01:00
parent 7f725b9eee
commit 65e14fd23f

View File

@@ -1,3 +1,12 @@
ActsAsTaggableOn.setup do |config|
# This works because the classes where the base class is a concern, Tag and Tagging
# are autoloaded, and won't be started until after the initializers run. The value
# must be a String, as the Rails Zeitwerk autoloader will not allow models to be
# referenced at initialization time.
#
# config.base_class = "ApplicationRecord"
end
module ActsAsTaggableOn
Tagging.class_eval do
after_create :increment_tag_custom_counter