[openstreetmap/openstreetmap-website] Adds optional use of notes records (PR #5511)
Anton Khorev
notifications at github.com
Sun Jan 19 14:46:20 UTC 2025
@AntonKhorev commented on this pull request.
> def description
- comments.first.body
+ if user_ip.nil? && user_id.nil?
+ comments.first.body
+ else
+ RichText.new("text", self[:description])
+ end
end
I assume that `self[:description]` is going to be the true note description, the text note was created with. `comments.first.body` is not necessarily that text because `comments.first` is not necessarily the first api 0.6 comment. `comments` only contain api 0.6 comments by active users and doesn't contain api 0.6 comments of deleted users.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5511#pullrequestreview-2561025712
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5511/review/2561025712 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250119/7f885d64/attachment.htm>
More information about the rails-dev
mailing list