[openstreetmap/openstreetmap-website] Introduce scoped placeholder `type:` for element routes (PR #6149)
Anton Khorev
notifications at github.com
Tue Aug 12 03:24:25 UTC 2025
@AntonKhorev commented on this pull request.
> @@ -7,8 +7,10 @@
of the above pages support.
The router is initialized with a set of routes: a mapping of URL path templates
- to route controller objects. Path templates can contain placeholders
- (`/note/:id`) and optional segments (`/:type/:id(/history)`).
+ to route controller objects. Path templates can contain
+ placeholders (`/note/:id`),
+ scoped placeholders (`/type:node way relation/:id`) and
The current syntax is similar to Rails routes:
- https://api.rubyonrails.org/classes/ActionDispatch/Routing/Mapper/Base.html#method-i-match
- https://guides.rubyonrails.org/routing.html#non-resourceful-routes
If we want to stick to that, we need something like [segment constraints](https://guides.rubyonrails.org/routing.html#segment-constraints).
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6149#pullrequestreview-3108426488
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6149/review/3108426488 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250811/9dee9698/attachment.htm>
More information about the rails-dev
mailing list