Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Accept mail options in Devise::Mailer and deprecate headers_for
- Loading branch information
José Valim
committed
Jan 4, 2013
1 parent
7c8f636
commit 19b5bcb
Showing
5 changed files
with
23 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
class Devise::Mailer < ::ActionMailer::Base | ||
include Devise::Mailers::Helpers | ||
|
||
def confirmation_instructions(record) | ||
devise_mail(record, :confirmation_instructions) | ||
def confirmation_instructions(record, opts={}) | ||
devise_mail(record, :confirmation_instructions, opts) | ||
end | ||
|
||
def reset_password_instructions(record) | ||
devise_mail(record, :reset_password_instructions) | ||
def reset_password_instructions(record, opts={}) | ||
devise_mail(record, :reset_password_instructions, opts) | ||
end | ||
|
||
def unlock_instructions(record) | ||
devise_mail(record, :unlock_instructions) | ||
def unlock_instructions(record, opts={}) | ||
devise_mail(record, :unlock_instructions, opts) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,10 +93,6 @@ def inactive_message | |
def authenticatable_salt | ||
end | ||
|
||
def headers_for(name) | ||
{} | ||
end | ||
|
||
array = %w(serializable_hash) | ||
# to_xml does not call serializable_hash on 3.1 | ||
array << "to_xml" if Rails::VERSION::STRING[0,3] == "3.1" | ||
|
@@ -159,8 +155,8 @@ def devise_mailer | |
# end | ||
# end | ||
# | ||
def send_devise_notification(notification) | ||
devise_mailer.send(notification, self).deliver | ||
def send_devise_notification(notification, opts={}) | ||
devise_mailer.send(notification, self, opts).deliver | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
rpechayr
via email
Contributor
|
||
end | ||
|
||
def downcase_keys | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 comment
on commit 19b5bcb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
Hi,
This call does not work for Rails 3.1.10. I think devise 2.2 does not work priori to rails 3.2.