X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/c12fe5f6e82c9f0321825ba11eeec16e13f31b29..68044c60545093f813ab46611973f052b4584e9a:/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