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
Jérome Perrin
gitlab-ce
Commits
9b57ad38
Commit
9b57ad38
authored
Aug 30, 2016
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move #to_discussion to NoteOnDiff
parent
43d50117
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
8 deletions
+4
-8
app/models/concerns/note_on_diff.rb
app/models/concerns/note_on_diff.rb
+4
-0
app/models/diff_note.rb
app/models/diff_note.rb
+0
-4
app/models/legacy_diff_note.rb
app/models/legacy_diff_note.rb
+0
-4
No files found.
app/models/concerns/note_on_diff.rb
View file @
9b57ad38
...
...
@@ -28,4 +28,8 @@ module NoteOnDiff
def
can_be_award_emoji?
false
end
def
to_discussion
Discussion
.
new
([
self
])
end
end
app/models/diff_note.rb
View file @
9b57ad38
...
...
@@ -107,10 +107,6 @@ class DiffNote < Note
self
.
noteable
.
find_diff_discussion
(
self
.
discussion_id
)
end
def
to_discussion
Discussion
.
new
([
self
])
end
private
def
supported?
...
...
app/models/legacy_diff_note.rb
View file @
9b57ad38
...
...
@@ -53,10 +53,6 @@ class LegacyDiffNote < Note
self
.
line_code
end
def
to_discussion
Discussion
.
new
([
self
])
end
# Check if this note is part of an "active" discussion
#
# This will always return true for anything except MergeRequest noteables,
...
...
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