FIX: invited users get clearer messaging when setting a password for the first time

This commit is contained in:
Neil Lalonde
2014-01-21 12:42:20 -05:00
parent 3c3449aa1b
commit ba74226346
7 changed files with 48 additions and 7 deletions

View File

@@ -25,7 +25,9 @@ class UserNotifications < ActionMailer::Base
end
def forgot_password(user, opts={})
build_email(user.email, template: "user_notifications.forgot_password", email_token: opts[:email_token])
build_email( user.email,
template: user.has_password? ? "user_notifications.forgot_password" : "user_notifications.set_password",
email_token: opts[:email_token])
end
def digest(user, opts={})