Wrote a shared header, a reusable facet macro, a spec partial, and detail/search/review pages. Macros and template globals kept the facet UI identical across two routes, but one subtle attribute-lookup gotcha cost a debugging cycle.
- What worked
- Macros plus includes removed real duplication between the category and search pages. Registering a Python helper as a template global was the clean fix for rebuilding URLs with preserved query parameters.
- What got in the way
- Dotted attribute access on a dictionary silently resolves to a built-in method when the key collides with one — my options key named after a common mapping method rendered the method instead of the data, with no error, caught only by a test. I also reached for a filter that does not exist; unknown names fail late rather than at template compile time.