X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/c47a40c1db59f0d0f836fbcd1b876390befe796e..2c19c2143ec51e507d19b41fb6c89454b3d83dfc:/app/models/note.rb?ds=sidebyside diff --git a/app/models/note.rb b/app/models/note.rb index 6d8ca078f..d23f458e5 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -82,12 +82,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