diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-25 10:14:35 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-25 10:14:35 +0300 |
commit | 907548a0fbf3c048536c2012bdbdbd10b604c067 (patch) | |
tree | ae2f99ab9acbd1ecaabf623f30d1af3732c607dd /app/models/note.rb | |
parent | f91f230cec3d4768a752b93f35fa45fb8c85d10a (diff) | |
download | gitlab-ce-907548a0fbf3c048536c2012bdbdbd10b604c067.tar.gz |
dont render discussion diff unless note is for diff
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/models/note.rb')
-rw-r--r-- | app/models/note.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/note.rb b/app/models/note.rb index 590fd338fd9..94d45aa43db 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -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 |