Peter Amiri
07/01/2026, 12:05 PMresources() → the 7 RESTful routes from one call (and why update is secretly TWO routes — PATCH and PUT)
• Nested resources: the callback form auto-closes for you; nested=true makes YOU call .end(). Mix them and you add an extra end() that pops an empty scope stack and throws.
• Route model binding — binding=true resolves <http://params.post|params.post> before your action runs and 404s a missing record, so the findByKey + not-found dance disappears
• Convention vs explicit binding diverge on a missing model class (skip vs re-throw); a missing record always 404s
• The traps: route order is load-bearing (wildcard LAST), and you can't name an action after a framework helper (model, redirectTo, the is* predicates) or it 404s
Standalone how-to with a full worked config/routes.cfm. If you've ever shipped /posts/999999 and gotten a stack trace instead of a 404, this is the post.