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
39061af9
Commit
39061af9
authored
May 15, 2012
by
Robb Kidd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make Notify#new_issue_email resque friendly.
parent
2d124d94
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
8 deletions
+5
-8
app/mailers/notify.rb
app/mailers/notify.rb
+3
-6
app/views/notify/new_issue_email.html.haml
app/views/notify/new_issue_email.html.haml
+1
-1
spec/mailers/notify_spec.rb
spec/mailers/notify_spec.rb
+1
-1
No files found.
app/mailers/notify.rb
View file @
39061af9
...
...
@@ -13,12 +13,9 @@ class Notify < ActionMailer::Base
mail
(
:to
=>
@user
.
email
,
:subject
=>
"gitlab | Account was created for you"
)
end
def
new_issue_email
(
issue
)
@issue
=
Issue
.
find
(
issue
[
'id'
])
@user
=
@issue
.
assignee
@project
=
@issue
.
project
mail
(
:to
=>
@user
.
email
,
:subject
=>
"gitlab | New Issue was created"
)
def
new_issue_email
(
issue_id
)
@issue
=
Issue
.
find
(
issue_id
)
mail
(
:to
=>
@issue
.
assignee_email
,
:subject
=>
"gitlab | New Issue was created"
)
end
def
note_wall_email
(
recipient_id
,
note_id
)
...
...
app/views/notify/new_issue_email.html.haml
View file @
39061af9
...
...
@@ -10,7 +10,7 @@
%td
{
:style
=>
"font-size: 1px; line-height: 1px;"
,
:width
=>
"21"
}
%td
{
:align
=>
"left"
,
:style
=>
"padding: 20px 0 0;"
}
%h2
{
:style
=>
"color:#646464 !important; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "
}
=
link_to
project_issue_url
(
@project
,
@issue
),
:title
=>
@issue
.
title
do
=
link_to
project_issue_url
(
@
issue
.
project
,
@issue
),
:title
=>
@issue
.
title
do
=
"Issue #
#{
@issue
.
id
.
to_s
}
"
=
truncate
(
@issue
.
title
,
:length
=>
45
)
%br
spec/mailers/notify_spec.rb
View file @
39061af9
...
...
@@ -59,7 +59,7 @@ describe Notify do
let
(
:issue
)
{
Factory
.
create
(
:issue
,
:assignee
=>
assignee
,
:project
=>
project
)
}
describe
'that are new'
do
subject
{
Notify
.
new_issue_email
(
issue
)
}
subject
{
Notify
.
new_issue_email
(
issue
.
id
)
}
it_behaves_like
'an assignee email'
...
...
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