What problem does it solve?
It prevents Rails codebases from drifting into non-idiomatic patterns that create security risks, maintenance pain, and performance issues.
Core Features & Use Cases
- Active Record best practices: use chainable scopes, model-level validations, and eager loading (
includes) to avoid N+1 queries.
- Thin controllers with strong parameters: keep controllers focused on routing, move business logic into service objects, and strictly permit params.
- Hotwire-aware UI updates: use Turbo Frames/Streams and keep Stimulus for small JS enhancements.
- Safer error handling and security: apply
rescue_from appropriately, define domain errors, avoid rescue Exception, and prevent SQL injection by avoiding string interpolation in queries.
Quick Start
Use the rails-idioms skill to rewrite your controller and model code into conventional Rails patterns, including strong parameters, service objects, and correct eager loading for any app routes under app/**/*.rb and config/routes.rb.