diff --git a/Gemfile b/Gemfile index a40a4cfe7..b04643922 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gem "rails", "6.1.7.7" -gem "acts-as-taggable-on", "~> 9.0.1" +gem "acts-as-taggable-on", "~> 10.0.0" gem "acts_as_votable", "~> 0.14.0" gem "ahoy_matey", "~> 4.2.1" gem "airbrake", "~> 13.0.2" diff --git a/Gemfile.lock b/Gemfile.lock index 98724525c..e6d08a3dc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -66,8 +66,8 @@ GEM minitest (>= 5.1) tzinfo (~> 2.0) zeitwerk (~> 2.3) - acts-as-taggable-on (9.0.1) - activerecord (>= 6.0, < 7.1) + acts-as-taggable-on (10.0.0) + activerecord (>= 6.1, < 7.2) acts_as_votable (0.14.0) addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) @@ -690,7 +690,7 @@ PLATFORMS ruby DEPENDENCIES - acts-as-taggable-on (~> 9.0.1) + acts-as-taggable-on (~> 10.0.0) acts_as_votable (~> 0.14.0) ahoy_matey (~> 4.2.1) airbrake (~> 13.0.2) diff --git a/config/initializers/acts_as_taggable_on.rb b/config/initializers/acts_as_taggable_on.rb index d661338bb..7dea4aafc 100644 --- a/config/initializers/acts_as_taggable_on.rb +++ b/config/initializers/acts_as_taggable_on.rb @@ -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