Merge branch 'master' into notes
[rails.git] / app / models / note.rb
index 14806be266dfd1114e62ad324a97708aafc8e65b..bb56c5ce0d6e73612b3358b1bdf9cc84226cc0b3 100644 (file)
@@ -49,7 +49,12 @@ class Note < ActiveRecord::Base
 
   # Check if a note is visible
   def visible?
-    return status != "hidden"
+    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