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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
76463c2c
Commit
76463c2c
authored
Sep 30, 2016
by
Fu Xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
override subject method in devise mailer
parent
064eb2ca
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
app/mailers/devise_mailer.rb
app/mailers/devise_mailer.rb
+8
-0
spec/mailers/notify_spec.rb
spec/mailers/notify_spec.rb
+2
-1
No files found.
app/mailers/devise_mailer.rb
View file @
76463c2c
...
...
@@ -3,4 +3,12 @@ class DeviseMailer < Devise::Mailer
default
reply_to:
Gitlab
.
config
.
gitlab
.
email_reply_to
layout
'devise_mailer'
protected
def
subject_for
(
key
)
subject
=
super
subject
<<
" |
#{
Gitlab
.
config
.
gitlab
.
email_subject_suffix
}
"
if
Gitlab
.
config
.
gitlab
.
email_subject_suffix
.
length
>
0
subject
end
end
spec/mailers/notify_spec.rb
View file @
76463c2c
...
...
@@ -831,6 +831,7 @@ describe Notify do
let
(
:user
)
{
create
(
:user
,
email:
'old-email@mail.com'
)
}
before
do
stub_config_setting
(
email_subject_suffix:
'A Nice Suffix'
)
perform_enqueued_jobs
do
user
.
email
=
"new-email@mail.com"
user
.
save
...
...
@@ -847,7 +848,7 @@ describe Notify do
end
it
'has the correct subject'
do
is_expected
.
to
have_subject
"Confirmation instructions"
is_expected
.
to
have_subject
/^Confirmation instructions/
end
it
'includes a link to the site'
do
...
...
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