From 99267d294355cb67b9461a80621cc627136d8695 Mon Sep 17 00:00:00 2001 From: Joel Kaasinen Date: Mon, 26 May 2025 10:14:14 +0300 Subject: [PATCH] doc: mention that coercion uses top-level-route-data-middleware --- doc/ring/ring.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/ring/ring.md b/doc/ring/ring.md index 4dea0bbc..2650552d 100644 --- a/doc/ring/ring.md +++ b/doc/ring/ring.md @@ -243,4 +243,5 @@ using all of the above techniques: - If you have a generic middleware, that doesn't depend on the route, use _top-level middleware_ - If you want to apply a middleware to only a couple of routes, use _nested middleware_ (ie. _route data_) -- If you want a middleware to apply to all routes, but use route-specific data, consider _top-level route data_ combined with [Compiling Middleware](compiling_middleware.md) +- If you want a middleware to apply to all routes, but use route-specific data, you need _top-level route data_ combined with [Compiling Middleware](compiling_middleware.md) + - This is what many reitit features like [Ring Coercion](coercion.md) do. Check the examples & docs for the reitit features you want to use!