2018-11-20 20:47:30 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-06-16 23:09:34 +05:30
|
|
|
class DeviseMailerPreview < ActionMailer::Preview
|
|
|
|
def confirmation_instructions_for_signup
|
2016-06-22 15:30:34 +05:30
|
|
|
DeviseMailer.confirmation_instructions(unsaved_user, 'faketoken', {})
|
2016-06-16 23:09:34 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
def confirmation_instructions_for_new_email
|
|
|
|
user = User.last
|
2016-06-22 15:30:34 +05:30
|
|
|
user.unconfirmed_email = 'unconfirmed@example.com'
|
|
|
|
|
2016-06-16 23:09:34 +05:30
|
|
|
DeviseMailer.confirmation_instructions(user, 'faketoken', {})
|
|
|
|
end
|
2016-06-22 15:30:34 +05:30
|
|
|
|
|
|
|
def reset_password_instructions
|
|
|
|
DeviseMailer.reset_password_instructions(unsaved_user, 'faketoken', {})
|
|
|
|
end
|
|
|
|
|
|
|
|
def unlock_instructions
|
|
|
|
DeviseMailer.unlock_instructions(unsaved_user, 'faketoken', {})
|
|
|
|
end
|
|
|
|
|
|
|
|
def password_change
|
|
|
|
DeviseMailer.password_change(unsaved_user, {})
|
|
|
|
end
|
|
|
|
|
2021-01-29 00:20:46 +05:30
|
|
|
def user_admin_approval
|
|
|
|
DeviseMailer.user_admin_approval(unsaved_user, {})
|
|
|
|
end
|
|
|
|
|
2016-06-22 15:30:34 +05:30
|
|
|
private
|
|
|
|
|
|
|
|
def unsaved_user
|
|
|
|
User.new(name: 'Jane Doe', email: 'jdoe@example.com')
|
|
|
|
end
|
2016-06-16 23:09:34 +05:30
|
|
|
end
|