add block passthrough to devise_mail
ActionMailer's ``mail`` method may receive a block for customizing the mails format ``devise_mail`` now has the same functionality by just passing the block to ``mail`` call. fixes plataformatec/devise#2341
This commit is contained in:
parent
e6b5f5f31a
commit
e90ba2fbcb
|
@ -11,9 +11,9 @@ module Devise
|
|||
protected
|
||||
|
||||
# Configure default email options
|
||||
def devise_mail(record, action, opts={})
|
||||
def devise_mail(record, action, opts = {}, &block)
|
||||
initialize_from_record(record)
|
||||
mail headers_for(action, opts)
|
||||
mail headers_for(action, opts), &block
|
||||
end
|
||||
|
||||
def initialize_from_record(record)
|
||||
|
|
Loading…
Reference in New Issue