DEV: Upgrade Rails to version 7.1

---------

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
This commit is contained in:
Loïc Guitaut
2024-06-20 10:33:01 +02:00
committed by Loïc Guitaut
parent 7b8863fcd5
commit 8d249457e8
49 changed files with 534 additions and 299 deletions

View File

@ -954,14 +954,7 @@ module Discourse
def self.warn(message, env = nil)
append = env ? (+" ") << env.map { |k, v| "#{k}: #{v}" }.join(" ") : ""
if !(Logster::Logger === Rails.logger)
Rails.logger.warn("#{message}#{append}")
return
end
loggers = [Rails.logger]
loggers.concat(Rails.logger.chained) if Rails.logger.chained
loggers = Rails.logger.broadcasts
logster_env = env
if old_env = Thread.current[Logster::Logger::LOGSTER_ENV]
@ -1116,16 +1109,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