[openstreetmap/openstreetmap-website] Show tag changes in object history view (PR #6448)
Ian Dees
notifications at github.com
Thu Oct 16 01:50:29 UTC 2025
@iandees commented on this pull request.
> + changes = {}
+
+ # Check for added and modified tags
+ current_tags.each do |key, value|
+ if !previous_tags.key?(key)
+ changes[key] = { type: :added, current: value }
+ elsif previous_tags[key] != value
+ changes[key] = { type: :modified, current: value, previous: previous_tags[key] }
+ else
+ changes[key] = { type: :unchanged, current: value }
+ end
+ end
This is nicer, thanks. Improved in 8b1fb0bf6.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6448#discussion_r2434349903
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6448/review/3342813726 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20251015/0a490bbb/attachment-0001.htm>
More information about the rails-dev
mailing list