Skip to content
Snippets Groups Projects
Commit 7b66dcf6 authored by Robert Speicher's avatar Robert Speicher
Browse files

Add previews for all customized Devise emails

parent 933cd347
No related branches found
No related tags found
No related merge requests found
class DeviseMailerPreview < ActionMailer::Preview
def confirmation_instructions_for_signup
user = User.new(name: 'Jane Doe', email: 'signup@example.com')
DeviseMailer.confirmation_instructions(user, 'faketoken', {})
DeviseMailer.confirmation_instructions(unsaved_user, 'faketoken', {})
end
 
def confirmation_instructions_for_new_email
user = User.last
user.unconfirmed_email = 'unconfirmed@example.com'
DeviseMailer.confirmation_instructions(user, 'faketoken', {})
end
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
private
def unsaved_user
User.new(name: 'Jane Doe', email: 'jdoe@example.com')
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment