rails-antipattern-fat-controller
Installation
SKILL.md
Antipattern: Fat Controller
The smell
- Action method longer than ~10 lines
- Branching on business rules inside the controller
- External API calls (Stripe, etc.) in controller code
- Multi-step orchestration: persist + email + enqueue + redirect, all inline
- Domain logic invisible from outside the HTTP path (jobs, console, API can't reuse it)
Why it hurts
- Untestable without a full request cycle
- Logic can't be reused from a job, console, or different endpoint
- Mixes HTTP concerns (params, redirects, status codes) with domain logic
- Tends to grow indefinitely