DEV: Upgrade Rails to 7.1

This commit is contained in:
Loïc Guitaut
2024-05-31 11:07:19 +02:00
committed by Loïc Guitaut
parent 69c99a82dd
commit 081b00391e
42 changed files with 409 additions and 224 deletions

View File

@ -1116,16 +1116,7 @@ module Discourse
end
end
schema_cache = ActiveRecord::Base.connection.schema_cache
RailsMultisite::ConnectionManagement.safe_each_connection do
# load up schema cache for all multisite assuming all dbs have
# an identical schema
dup_cache = schema_cache.dup
# this line is not really needed, but just in case the
# underlying implementation changes lets give it a shot
dup_cache.connection = nil
ActiveRecord::Base.connection.schema_cache = dup_cache
I18n.t(:posts)
# this will force Cppjieba to preload if any site has it