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
Boxiang Sun
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
Hide 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
...
@@ -28,4 +28,8 @@ module NoteOnDiff
def
can_be_award_emoji?
def
can_be_award_emoji?
false
false
end
end
def
to_discussion
Discussion
.
new
([
self
])
end
end
end
app/models/diff_note.rb
View file @
9b57ad38
...
@@ -107,10 +107,6 @@ class DiffNote < Note
...
@@ -107,10 +107,6 @@ class DiffNote < Note
self
.
noteable
.
find_diff_discussion
(
self
.
discussion_id
)
self
.
noteable
.
find_diff_discussion
(
self
.
discussion_id
)
end
end
def
to_discussion
Discussion
.
new
([
self
])
end
private
private
def
supported?
def
supported?
...
...
app/models/legacy_diff_note.rb
View file @
9b57ad38
...
@@ -53,10 +53,6 @@ class LegacyDiffNote < Note
...
@@ -53,10 +53,6 @@ class LegacyDiffNote < Note
self
.
line_code
self
.
line_code
end
end
def
to_discussion
Discussion
.
new
([
self
])
end
# Check if this note is part of an "active" discussion
# Check if this note is part of an "active" discussion
#
#
# This will always return true for anything except MergeRequest noteables,
# 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