[openstreetmap/openstreetmap-website] Remove assert_method from api controllers (PR #4622)
Anton Khorev
notifications at github.com
Mon Mar 25 04:22:15 UTC 2024
- The name is confusing. It looks like a test assertion, but it's not.
- This check is unnecessary. You're only routed to actions if you use correct http verbs. If you reached the action method, you know that the verb is correct.
When `assert_method` was added in https://github.com/openstreetmap/openstreetmap-website/commit/3d0ca940d26bdc23aa791178b01b816185c5a086, [most of routes didn't check http methods](https://github.com/openstreetmap/openstreetmap-website/blob/3d0ca940d26bdc23aa791178b01b816185c5a086/config/routes.rb). That's why this check was necessary.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/4622
-- Commit Summary --
* Remove assert_method from api controllers
-- File Changes --
M app/controllers/api/changesets_controller.rb (13)
M app/controllers/api/nodes_controller.rb (2)
M app/controllers/api/relations_controller.rb (2)
M app/controllers/api/ways_controller.rb (2)
M app/controllers/api_controller.rb (8)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/4622.patch
https://github.com/openstreetmap/openstreetmap-website/pull/4622.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4622
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4622 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240324/f5d559f3/attachment.htm>
More information about the rails-dev
mailing list