Skip to content

Commit f87d14e

Browse files
authored
In generic_send_email, check if mail object responds to delivery method instead of checking inheritance from ActionMailer (#211)
* Check if mail object responds to delivery method Instead of checking for an inheritance of ActionMailer::Base, just see if the conffigure mailer and method respond to the configured delivery method. Since both the mailer and the willingniess to automatically send out messages can be configured, the message should be send if it is sendable, regardless of which Class the configured mailer inherits from. * Add empty mainifest.js to rails_app Not having a manifest was causing issues running `bundle exec rake` with sprockets 4.
1 parent 16bb809 commit f87d14e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/sorcery/model.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def clear_virtual_password
206206
def generic_send_email(method, mailer)
207207
config = sorcery_config
208208
mail = config.send(mailer).send(config.send(method), self)
209-
return unless defined?(ActionMailer) && config.send(mailer).is_a?(Class) && config.send(mailer) < ActionMailer::Base
209+
return unless mail.respond_to?(config.email_delivery_method)
210210

211211
mail.send(config.email_delivery_method)
212212
end

0 commit comments

Comments
 (0)