[openstreetmap/openstreetmap-website] Don't duplicate note comments in RSS feeds for new notes (#2029)

Rory McCann notifications at github.com
Sat Oct 20 16:19:07 UTC 2018


Currently, in the RSS feed of note activity, when a note is created, the note is included twice, because it includes the comment on the note, and then the whole note. With only one comment, the latter is redudant.

e.g.:
> new note (near Dolphin's Barn, Ushers E ED, Dublin 8, Dublin, County Dublin, Leinster, D08 WN40, Ireland)
> 20 October 2018, 17:13
> Comment
> Created 10 minutes ago by ManAboutCouch
> closed
> Full note
> Created 10 minutes ago by ManAboutCouch
> closed

This is my attempt to fix that. I know very little about Ruby, or Rails, so please excuse any beginner mistakes. :) Feel free to rip this apart and do it properly, if needed. This is my first patch to the OSM-website. :)

I think this should also apply to the email content as well, right?
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/2029

-- Commit Summary --

  * unittest
  * Don't show the note twice in the RSS feed entry when it's first created

-- File Changes --

    M app/views/notes/_entry.html.erb (2)
    M test/controllers/notes_controller_test.rb (27)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/2029.patch
https://github.com/openstreetmap/openstreetmap-website/pull/2029.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/2029
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20181020/bec97391/attachment.html>


More information about the rails-dev mailing list