[openstreetmap/openstreetmap-website] Make changeset comment create action resourceful (PR #5725)
Anton Khorev
notifications at github.com
Sun Feb 23 20:03:59 UTC 2025
Paths are not changed because there was no `PUT .../create` for creating changeset comments.
The only thing that's going to look a little strange is the path helper. It's named `api_changeset_changeset_comments_path` with "changeset" twice. That's how rails normally names it because we have `Changeset` parent model/controller and `ChangesetComment` child model/controller, and `Changeset`+`ChangesetComment` gives `changeset_changeset_comments`. To avoid that it's possible to rename the child resources to just `comments` and get `api_changeset_comments_path` helper, however this name is already occupied by changeset comments that are not nested in changesets: #4359.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/5725
-- Commit Summary --
* Make changeset comment create action resourceful
-- File Changes --
M app/controllers/api/changeset_comments_controller.rb (6)
M app/views/changesets/show.html.erb (2)
M config/routes.rb (2)
M test/controllers/api/changeset_comments_controller_test.rb (48)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/5725.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5725.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5725
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5725 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250223/80736d12/attachment.htm>
More information about the rails-dev
mailing list