discourse/config/initializers/100-flags.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
260 B
Ruby
Raw Normal View History

# frozen_string_literal: true
# On initialize, reset flags cache
Rails.application.config.to_prepare do
if Discourse.cache.is_a?(Cache) &&
2024-08-19 08:44:17 -04:00
!ActiveRecord::Base.connection_pool.migration_context.needs_migration?
Flag.reset_flag_settings!
end
end