| name | rails |
| description | Router for Ruby/Rails work: Rails Guides, official reference apps, four schools (incl. packwerk), Active Record associations, webhooks, migrations, security, jobs, Hotwire/realtime, testing, Docker dev, performance, upgrades, Inertia, refactoring. Use for Rails/Ruby tasks; vanilla 37signals is default, escalate on named pains. Read one reference. Triggers: Rails, Ruby, migration, Turbo, Sidekiq, RSpec, Minitest, N+1, DHH. |
Rails (router)
Sources/gaps: references/sources.md maps which Rails references already have provenance; references/coverage-gaps.md lists places where rules should stay project-local until source-backed.
For Rails/Ruby work, route through this file first; do not jump straight to a style reference. Pick the school — vanilla 37signals (references/dhh-style.md) is the DEFAULT; escalate only on named pains — then the topic file. Read exactly one reference file; its full body loads on demand.
Schools (four positions): references/dhh-style.md (vanilla 37signals default — fat models, concerns, Hotwire, Solid suite; owns database-per-tenant architecture) · references/layered-rails.md (Evil Martians extraction — named layers, Action Policy, gem map) · packwerk module boundaries (Shopify; no separate file — its criteria live in the four-school router inside references/rails-event-sourcing.md) · references/rails-event-sourcing.md (Arkency — DDD, events, aggregates; carries the full four-school router). Pain→school: models/controllers bloat → layered-rails · "200 models, zero modules" but simple processes → packwerk · process state accreting on entity tables (status enums, *_sent_at/retry columns) → rails-event-sourcing · no named pain → stay vanilla. references/ruby-refactoring.md (thoughtbot smell→refactoring catalog) is an extraction aid, not a school. Route by project; never blend schools in one codebase.