forked from External/greenlight
GRN-45: Fixed the URL being sent in the password reset email (#351)
* Fixed the url used in the reset password emails and added the ability to preview emails in the dev environment * Replaced localhost with example.com in email previews * Update password_reset.html.erb
This commit is contained in:
committed by
Jesus Federico
parent
ecee282fc4
commit
c73064a70a
@ -1,4 +1,20 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class UserMailerPreview < ActionMailer::Preview
|
||||
# Preview this email at
|
||||
# http://localhost:3000/rails/mailers/user_mailer/password_reset
|
||||
def password_reset
|
||||
user = User.first
|
||||
user.reset_token = User.new_token
|
||||
url = "http://example.com" + "/password_resets/" + user.reset_token + "/edit?email=" + user.email
|
||||
UserMailer.password_reset(user, url)
|
||||
end
|
||||
|
||||
# Preview this email at
|
||||
# http://localhost:3000/rails/mailers/user_mailer/verify_email
|
||||
def verify_email
|
||||
user = User.first
|
||||
url = "http://example.com" + "/u/verify/confirm/" + user.uid
|
||||
UserMailer.verify_email(user, url)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user