mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-10 08:08:00 -05:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user