If noteable is nil - make discussion outdated
This commit is contained in:
parent
fe0174799d
commit
b758b4c80b
|
@ -296,6 +296,7 @@ class Note < ActiveRecord::Base
|
|||
# If not - its outdated diff
|
||||
def active?
|
||||
return true unless self.diff
|
||||
return false unless noteable
|
||||
|
||||
noteable.diffs.each do |mr_diff|
|
||||
next unless mr_diff.new_path == self.diff.new_path
|
||||
|
|
Loading…
Reference in New Issue