Skip to content

Commit 1b28cb1

Browse files
committed
Fix Zeitwerk autoloading when ActionMailer is not present.
1 parent 90a3fa8 commit 1b28cb1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/devise/rails.rb

+6
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,11 @@ class Engine < ::Rails::Engine
4747
)
4848
end
4949
end
50+
51+
initializer "devise.configure_zeitwerk" do
52+
if Rails.autoloaders.zeitwerk_enabled? && !defined?(ActionMailer)
53+
Rails.autoloaders.main.ignore("#{root}/app/mailers/devise/mailer.rb")
54+
end
55+
end
5056
end
5157
end

0 commit comments

Comments
 (0)