]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/note.rb
Merge remote-tracking branch 'osmlab/welcome-2'
[rails.git] / app / models / note.rb
index 490ff43cb8299beba1259b405bc03070d6d06818..10b74d8a669a46f431a03b476f94494c38064476 100644 (file)
@@ -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"