X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/c12fe5f6e82c9f0321825ba11eeec16e13f31b29..898cc828dd1f1167f85abbf35c8e3f0ed640ac1e:/app/models/note.rb diff --git a/app/models/note.rb b/app/models/note.rb index 801e1f3cb..bb56c5ce0 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -52,6 +52,11 @@ class Note < ActiveRecord::Base status != "hidden" end + # Check if a note is closed + def closed? + not closed_at.nil? + end + # Return the author object, derived from the first comment def author self.comments.first.author