2019-05-02 17:17:27 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2021-03-15 17:47:57 -05:00
|
|
|
# Multisite freedom patch defines RailsMultisite::DiscoursePatches.config which is used by 200-first_middlewares.rb
|
|
|
|
# Therefore it can not be postponed with .to_prepare
|
2024-06-26 11:55:05 -05:00
|
|
|
RUN_WITHOUT_PREPARE = ["#{Rails.root}/lib/freedom_patches/rails_multisite.rb"]
|
2021-03-15 17:47:57 -05:00
|
|
|
RUN_WITHOUT_PREPARE.each { |path| require(path) }
|
|
|
|
|
|
|
|
Rails.application.reloader.to_prepare do
|
|
|
|
Dir["#{Rails.root}/lib/freedom_patches/*.rb"].each do |f|
|
|
|
|
next if RUN_WITHOUT_PREPARE.any? { |path| path == f }
|
|
|
|
require(f)
|
|
|
|
end
|
2013-02-05 13:16:51 -06:00
|
|
|
end
|