X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/eac40b89af7f3a1c8b5bf6924640cf54a776e70b..d74d4f8d195673250c3f2e841d28f185d74d8849:/app/models/note.rb?ds=inline 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"