mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Rename Devise::Mailer.translate() to something more inline with what it does.
This commit is contained in:
parent
b2b8b5bf9a
commit
d48414b0a5
1 changed files with 3 additions and 3 deletions
|
@ -27,7 +27,7 @@ module Devise
|
||||||
|
|
||||||
def headers_for(action, opts)
|
def headers_for(action, opts)
|
||||||
headers = {
|
headers = {
|
||||||
:subject => translate(devise_mapping, action),
|
:subject => subject_for(action),
|
||||||
:to => resource.email,
|
:to => resource.email,
|
||||||
:from => mailer_sender(devise_mapping),
|
:from => mailer_sender(devise_mapping),
|
||||||
:reply_to => mailer_reply_to(devise_mapping),
|
:reply_to => mailer_reply_to(devise_mapping),
|
||||||
|
@ -86,8 +86,8 @@ module Devise
|
||||||
# confirmation_instructions:
|
# confirmation_instructions:
|
||||||
# subject: '...'
|
# subject: '...'
|
||||||
#
|
#
|
||||||
def translate(mapping, key)
|
def subject_for(key)
|
||||||
I18n.t(:"#{mapping.name}_subject", :scope => [:devise, :mailer, key],
|
I18n.t(:"#{devise_mapping.name}_subject", :scope => [:devise, :mailer, key],
|
||||||
:default => [:subject, key.to_s.humanize])
|
:default => [:subject, key.to_s.humanize])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue