X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/6279d83260cd9a03395a73f1c3df66ffe4c9486d..ae27f7adbe561b20203fa639ac1aa50d0408edc0:/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