DotcomWeb.Router
(MBTA Website v0.0.1)
View Source
Dotcom's router. A normal Phoenix router with a fairly large number of routes, which exist in order to support a large number of historical pages.
One quirk worth noting is that we have an all-purpose fallback. If
a path doesn't resolve to any of our hard-coded routes, then it
falls back to the DotcomWeb.CMSController. This means that the
URL sigil ~p won't provide a warning if you get a path wrong,
because in theory, that path could resolve to something in the
CMS.
Summary
Functions
Callback invoked by Plug on every request.
Callback implementation for Phoenix.VerifiedRoutes.formatted_routes/1.
A custom error handling function that renders the appropriate error page.
Callback required by Plug that initializes the router for serving web requests.
Callback implementation for Phoenix.VerifiedRoutes.verified_route?/2.
Functions
Callback invoked by Plug on every request.
Callback implementation for Phoenix.VerifiedRoutes.formatted_routes/1.
A custom error handling function that renders the appropriate error page.
For most (unexpected) errors, we render a 500 page. When we see a
DotcomWeb.NotFoundError, we render the 404 page instead.
Callback required by Plug that initializes the router for serving web requests.
Callback implementation for Phoenix.VerifiedRoutes.verified_route?/2.