Skip to content

Fixed the problem where #mail module method was not fired#14

Open
Fire-Dragon-DoL wants to merge 9 commits intostephenb:masterfrom
Fire-Dragon-DoL:master
Open

Fixed the problem where #mail module method was not fired#14
Fire-Dragon-DoL wants to merge 9 commits intostephenb:masterfrom
Fire-Dragon-DoL:master

Conversation

@Fire-Dragon-DoL
Copy link

Because the instance method ActionMailer::Base#mail takes precedence over SendGrid::ClassMethods#mail method, the module method was never run.

To fix this, I override #mail in the class_eval when module is included, moving the mail method from ClassMethods directly in here and adding at the end #send_grid_old_mail method call, which is just an alias for ActionMailer::Base#mail method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant