[openstreetmap/openstreetmap-website] Rename Feeds::ChangesetCommentsController to ChangesetComments::FeedsController (PR #5126)

Andy Allan notifications at github.com
Wed Aug 28 17:44:21 UTC 2024


Followup to #4587 

We usually create nested controllers with the main controller as the module, and the nested controller as the specialization, e.g. Users::DeletionsController or Traces::IconsController.

This then leaves the topic of whether the feed resource is plural, and whether we are then showing a singular feed or showing a list (index) of objects.

The routes are carefully named so that we have `changesets_comments_feed_path` (the comments feed for all changesets) vs `changeset_comment_feed_path(changeset)` (the comments for a singular changeset).
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Rename Feeds::ChangesetCommentsController to ChangesetComments::FeedsController

-- File Changes --

    M app/abilities/ability.rb (2)
    R app/controllers/changeset_comments/feeds_controller.rb (8)
    R app/views/changeset_comments/feeds/_comment.html.erb (0)
    R app/views/changeset_comments/feeds/_comment.rss.builder (0)
    R app/views/changeset_comments/feeds/show.rss.builder (0)
    R app/views/changeset_comments/feeds/timeout.atom.builder (0)
    R app/views/changeset_comments/feeds/timeout.html.erb (0)
    M config/locales/en.yml (24)
    M config/routes.rb (10)
    R test/controllers/changeset_comments/feeds_controller_test.rb (18)

-- Patch Links --

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

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5126
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5126 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240828/3d72e2c0/attachment.htm>


More information about the rails-dev mailing list