-
Notifications
You must be signed in to change notification settings - Fork 21.9k
Closed
Description
Steps to reproduce
- Create a Rails 8 application with
require "action_mailer/railtie"
commented out inconfig/application.rb
- Run
bin/rails generate authentication
- Boot the app in production mode or with
config.eager_load = true
. Also can enterPasswordsMailer
in Rails console and try to evaluate the class.
Expected behavior
I believe all of the mailer templates should verify ActionMailer::Base
is defined before generating mailer related files
rails/railties/lib/rails/generators/rails/authentication/authentication_generator.rb
Lines 24 to 29 in 57c2494
template "app/mailers/passwords_mailer.rb" | |
template "app/views/passwords_mailer/reset.html.erb" | |
template "app/views/passwords_mailer/reset.text.erb" | |
template "test/mailers/previews/passwords_mailer_preview.rb" |
Actual behavior
PasswordsMailer is generated inheriting from ApplicationMailer, which does not exist.
System configuration
Rails version: Rails 8.0.1
Ruby version: ruby 3.3.6 (2024-11-05 revision 75015d4c1f) [x86_64-linux]
Metadata
Metadata
Assignees
Labels
No labels