X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e93241899820c5661de9dad8b86342966808a1e4..167bc5001d23c429f090c55a932c7d66e2cc2b8e:/app/models/note.rb diff --git a/app/models/note.rb b/app/models/note.rb index 490ff43cb..10b74d8a6 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -30,6 +30,13 @@ class Note < ActiveRecord::Base self.save end + # Reopen a note + def reopen + self.status = "open" + self.closed_at = nil + self.save + end + # Check if a note is visible def visible? status != "hidden"