Skip to content

Commit 37833de

Browse files
committed
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.
1 parent 3d2e960 commit 37833de

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

actionmailer/lib/action_mailer/railtie.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,6 @@ class Railtie < Rails::Railtie # :nodoc:
7171
initializer "action_mailer.set_autoload_paths", before: :set_autoload_paths do |app|
7272
options = app.config.action_mailer
7373
app.config.paths["test/mailers/previews"].concat(options.preview_paths)
74-
75-
# Preview paths configuration needs a pass.
76-
#
77-
# config.paths is cached as soon as it is accessed. Therefore, mutating
78-
# paths["test/mailers/previews"] does not guarantee config.autoload_paths
79-
# is going to include them.
80-
#
81-
# If config.paths was accessed before, config.autoload_paths is going to
82-
# have whatever paths["test/mailers/previews"] had when cached.
83-
app.config.autoload_paths.concat(options.preview_paths)
8474
end
8575

8676
initializer "action_mailer.compile_config_methods" do

0 commit comments

Comments
 (0)