Remove obsolete workaround in Action Mailer

The buggy interaction between config.paths and config.autoload_paths
described in the comment was fixed in 7.1.2.
This commit is contained in:
Xavier Noria 2023-11-21 20:54:55 +01:00
parent 3d2e9608ed
commit 37833debc6
1 changed files with 0 additions and 10 deletions

View File

@ -71,16 +71,6 @@ module ActionMailer
initializer "action_mailer.set_autoload_paths", before: :set_autoload_paths do |app|
options = app.config.action_mailer
app.config.paths["test/mailers/previews"].concat(options.preview_paths)
# Preview paths configuration needs a pass.
#
# config.paths is cached as soon as it is accessed. Therefore, mutating
# paths["test/mailers/previews"] does not guarantee config.autoload_paths
# is going to include them.
#
# If config.paths was accessed before, config.autoload_paths is going to
# have whatever paths["test/mailers/previews"] had when cached.
app.config.autoload_paths.concat(options.preview_paths)
end
initializer "action_mailer.compile_config_methods" do