routing

Installation
SKILL.md

Rails Routing Expert

Define clean, RESTful, minimal routes. Extra routes create unnecessary attack surface and confuse other developers reading routes.rb.

Philosophy

  1. RESTful by default — Use resources and resource. Custom routes are a smell.
  2. Minimal surface area — Always use only: or except: to expose just what's needed.
  3. Path helpers everywhere — Hardcoded URL strings break when routes change. Use _path and _url helpers.
  4. Shallow nesting only — Don't nest resources more than 1 level deep; deeper nesting creates painful URLs and helper names.
  5. New resource > custom action — If you're adding many custom actions, you need a new controller.

When To Use This Skill

  • Adding or modifying routes in config/routes.rb
  • Deciding between namespace, scope, and module
  • Nesting resources
  • Adding member or collection routes
  • Setting up API versioning
Related skills

More from thinkoodle/rails-skills

Installs
4
GitHub Stars
4
First Seen
12 days ago