diff options
Diffstat (limited to 'app/models/note.rb')
| -rw-r--r-- | app/models/note.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/models/note.rb b/app/models/note.rb index cb879dc2ce3..0b988cc3e0f 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -461,14 +461,17 @@ class Note < ActiveRecord::Base def superceded?(notes) return false unless vote? + notes.each do |note| next if note == self + if note.vote? && - self[:author_id] == note[:author_id] && - self[:created_at] <= note[:created_at] + self[:author_id] == note[:author_id] && + self[:created_at] <= note[:created_at] return true end end + false end |
