Skip to content

Commit

Permalink
Remove MailersController overrides
Browse files Browse the repository at this point in the history
All this code relates to ActionMailer previews and it is what we think
causes the previews to fail in Rails > 7.0.8.

Prepending any objectm, as was done here has a high price and is not
needed for the previews to work in Rails.

v2 will use a different approach to this.
  • Loading branch information
mec committed Apr 19, 2024
1 parent a59716e commit f3ac3d6
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 93 deletions.
1 change: 0 additions & 1 deletion lib/mail/notify.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
require "mail/notify/personalisation"
require "mail/notify/mailer"
require "mail/notify/message"
require "mail/notify/mailers_controller"

Mail::Message.include Mail::Notify::Message

Expand Down
6 changes: 0 additions & 6 deletions lib/mail/notify/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ class Engine < Rails::Engine
initializer "mail-notify.add_delivery_method", before: "action_mailer.set_configs" do
ActionMailer::Base.add_delivery_method(:notify, Mail::Notify::DeliveryMethod)
end

initializer "mail-notify.action_controller" do
ActiveSupport.on_load(:action_controller, run_once: true) do
Rails::MailersController.prepend(Mail::Notify::MailersController)
end
end
end
end
end
40 changes: 0 additions & 40 deletions lib/mail/notify/mailers_controller.rb

This file was deleted.

46 changes: 0 additions & 46 deletions spec/controllers/mailers_controller_spec.rb

This file was deleted.

0 comments on commit f3ac3d6

Please sign in to comment.