Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
7b66dcf6
Commit
7b66dcf6
authored
May 25, 2016
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add previews for all customized Devise emails
parent
933cd347
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
spec/mailers/previews/devise_mailer_preview.rb
spec/mailers/previews/devise_mailer_preview.rb
+21
-2
No files found.
spec/mailers/previews/devise_mailer_preview.rb
View file @
7b66dcf6
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment