Skip to content

Commit

Permalink
Fix Zeitwerk autoloading when ActionMailer is not present.
Browse files Browse the repository at this point in the history
  • Loading branch information
nashby committed Nov 25, 2024
1 parent 0f514f1 commit 95e0856
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/devise/rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,11 @@ class Engine < ::Rails::Engine
)
end
end

initializer "devise.configure_zeitwerk" do
if Rails.autoloaders.zeitwerk_enabled? && !defined?(ActionMailer)
Rails.autoloaders.main.ignore("#{root}/app/mailers/devise/mailer.rb")
end
end
end
end

0 comments on commit 95e0856

Please sign in to comment.