BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
907548a0
Unverified
Commit
907548a0
authored
Jun 25, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dont render discussion diff unless note is for diff
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
f91f230c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
notes_controller.rb
app/controllers/projects/notes_controller.rb
+2
-0
note.rb
app/models/note.rb
+2
-0
No files found.
app/controllers/projects/notes_controller.rb
View file @
907548a0
...
...
@@ -86,6 +86,8 @@ class Projects::NotesController < Projects::ApplicationController
end
def
note_to_discussion_with_diff_html
(
note
)
return
unless
note
.
for_diff_line?
render_to_string
(
"projects/notes/_discussion"
,
layout:
false
,
...
...
app/models/note.rb
View file @
907548a0
...
...
@@ -183,6 +183,8 @@ class Note < ActiveRecord::Base
# If exists - its active discussion
# If not - its outdated diff
def
active?
return
true
unless
self
.
diff
noteable
.
diffs
.
each
do
|
mr_diff
|
next
unless
mr_diff
.
new_path
==
self
.
diff
.
new_path
...
...
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