Rename Feeds::ChangesetCommentsController to ChangesetComments::FeedsController

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).
This commit is contained in:
Andy Allan 2024-08-28 18:18:26 +01:00
parent a948f2bc24
commit 10a4c5cf6e
10 changed files with 32 additions and 30 deletions

View file

@ -0,0 +1,13 @@
xml.rss("version" => "2.0",
"xmlns:dc" => "http://purl.org/dc/elements/1.1/") do
xml.channel do
if @changeset
xml.title t(".title_particular", :changeset_id => @changeset.id)
else
xml.title t(".title_all")
end
xml.link root_url
xml << render(:partial => "comment", :collection => @comments)
end
end