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
2d124d94
Commit
2d124d94
authored
May 15, 2012
by
Robb Kidd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add delegate for project's name on Note.
parent
41c00a20
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
app/mailers/notify.rb
app/mailers/notify.rb
+4
-4
app/models/note.rb
app/models/note.rb
+4
-0
No files found.
app/mailers/notify.rb
View file @
2d124d94
...
...
@@ -24,28 +24,28 @@ class Notify < ActionMailer::Base
def
note_wall_email
(
recipient_id
,
note_id
)
recipient
=
User
.
find
(
recipient_id
)
@note
=
Note
.
find
(
note_id
)
mail
(
:to
=>
recipient
.
email
,
:subject
=>
"gitlab |
#{
@note
.
project
.
name
}
"
)
mail
(
:to
=>
recipient
.
email
,
:subject
=>
"gitlab |
#{
@note
.
project
_
name
}
"
)
end
def
note_commit_email
(
recipient_id
,
note_id
)
recipient
=
User
.
find
(
recipient_id
)
@note
=
Note
.
find
(
note_id
)
@commit
=
@note
.
target
mail
(
:to
=>
recipient
.
email
,
:subject
=>
"gitlab | note for commit |
#{
@note
.
project
.
name
}
"
)
mail
(
:to
=>
recipient
.
email
,
:subject
=>
"gitlab | note for commit |
#{
@note
.
project
_
name
}
"
)
end
def
note_merge_request_email
(
recipient_id
,
note_id
)
recipient
=
User
.
find
(
recipient_id
)
@note
=
Note
.
find
(
note_id
)
@merge_request
=
@note
.
noteable
mail
(
:to
=>
recipient
.
email
,
:subject
=>
"gitlab | note for merge request |
#{
@note
.
project
.
name
}
"
)
mail
(
:to
=>
recipient
.
email
,
:subject
=>
"gitlab | note for merge request |
#{
@note
.
project
_
name
}
"
)
end
def
note_issue_email
(
recipient_id
,
note_id
)
recipient
=
User
.
find
(
recipient_id
)
@note
=
Note
.
find
(
note_id
)
@issue
=
@note
.
noteable
mail
(
:to
=>
recipient
.
email
,
:subject
=>
"gitlab | note for issue
#{
@issue
.
id
}
|
#{
@note
.
project
.
name
}
"
)
mail
(
:to
=>
recipient
.
email
,
:subject
=>
"gitlab | note for issue
#{
@issue
.
id
}
|
#{
@note
.
project
_
name
}
"
)
end
def
new_merge_request_email
(
merge_request
)
...
...
app/models/note.rb
View file @
2d124d94
...
...
@@ -7,6 +7,10 @@ class Note < ActiveRecord::Base
belongs_to
:author
,
:class_name
=>
"User"
delegate
:name
,
:to
=>
:project
,
:prefix
=>
true
delegate
:name
,
:email
,
:to
=>
:author
,
...
...
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