From b758b4c80bacd655f0241375c2391028cfd73f77 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Sat, 10 Jan 2015 19:26:00 -0800 Subject: If noteable is nil - make discussion outdated --- app/models/note.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/note.rb b/app/models/note.rb index 5996298be22..e99bc2668d6 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -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 -- cgit v1.2.1