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

Open
wants to merge 9 commits into
from

Projects

None yet

1 participant

@Fire-Dragon-DoL

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