app/mailers/quo_vadis/notifier.rb in quo_vadis-1.3.2 vs app/mailers/quo_vadis/notifier.rb in quo_vadis-1.4.0
- old
+ new
@@ -4,11 +4,11 @@
# Sends an email to <tt>user</tt> with a link to a page where they
# can change their password.
def change_password(user)
@username = user.username
@url = change_password_url user.token
- mail :to => user.email, :from => QuoVadis.from, :subject => QuoVadis.subject_change_password
+ mail :to => user.email, :from => QuoVadis.from, :subject => I18n.t('quo_vadis.notifier.change_password.subject')
end
# Sends an email to <tt>user</tt> with a link to a page where they
# can choose their username and password.
#
@@ -18,11 +18,11 @@
def invite(user, data = {})
@user = user
@url = invitation_url user.token
from = data.delete(:from) || QuoVadis.from
- subject = data.delete(:subject) || QuoVadis.subject_invitation
-
+ subject = data.delete(:subject) || I18n.t('quo_vadis.notifier.invite.subject')
+
data.each { |k,v| instance_variable_set :"@#{k}", v }
mail :to => user.email, :from => from, :subject => subject
end
end