X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e93241899820c5661de9dad8b86342966808a1e4..56fd5c4d90c7d3757fb97ff16c40aaa307ae1d22:/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"