15 lines
439 B
Ruby
15 lines
439 B
Ruby
# frozen_string_literal: true
|
|
# Preview all emails at http://localhost:3000/rails/mailers/user_mailer
|
|
class UserMailerPreview < ActionMailer::Preview
|
|
def password_reset
|
|
user = User.find_by(email: 'alan.admin@mailinator.com')
|
|
user.send(:gen_reset_token)
|
|
UserMailer.password_reset user
|
|
end
|
|
|
|
def welcome
|
|
user = User.find_by(email: 'alan.admin@mailinator.com')
|
|
UserMailer.welcome user, '[default-password]'
|
|
end
|
|
end
|