]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/note.rb
Merge remote-tracking branch 'upstream/pull/5499'
[rails.git] / app / models / note.rb
index d3d4d5c73eb568c96aa25e424f5b4521a6ca4371..17b57c0fa689ff5d6691d71b05ce6539a5770688 100644 (file)
@@ -89,12 +89,22 @@ class Note < ApplicationRecord
     closed_at + DEFAULT_FRESHLY_CLOSED_LIMIT
   end
 
-  # Return the author object, derived from the first comment
+  # Return the note's description, derived from the first comment
+  def description
+    comments.first.body
+  end
+
+  # Return the note's author object, derived from the first comment
   def author
     comments.first.author
   end
 
-  # Return the author IP address, derived from the first comment
+  # Return the note's author ID, derived from the first comment
+  def author_id
+    comments.first.author_id
+  end
+
+  # Return the note's author IP address, derived from the first comment
   def author_ip
     comments.first.author_ip
   end