Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
ebd49bbf7199
Commit
c05ed99b
authored
May 08, 2016
by
Robert Speicher
Browse files
Simplify Event's target type-checking
parent
7f5253bd668c
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/models/event.rb
View file @
ebd49bbf
...
...
@@ -279,15 +279,15 @@ def note_short_commit_id
end
def
note_commit?
target
.
noteable_type
==
"C
ommit
"
target
.
for_c
ommit
?
end
def
issue_note?
note?
&&
target
&&
target
.
noteable_type
==
"I
ssue
"
note?
&&
target
&&
target
.
for_i
ssue
?
end
def
note_project_snippet?
target
.
noteable_type
==
"S
nippet
"
target
.
for_s
nippet
?
end
def
note_target
...
...
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