rails-antipattern-fat-model-god-object

Installation
SKILL.md

Antipattern: Fat Model / God Object

The smell

  • One model owning many unrelated responsibilities (auth + billing + search + notifications + exports)
  • Hundreds-to-thousands of lines, constants and scopes sprawling
  • Every PR touches it; merge conflicts cluster on it

Why it hurts

  • Cognitive load — readers can't tell what the model is
  • Tests slow because every test loads every concern's deps
  • Encourages "just add it to User" forever

The fix (in order of preference)

  1. Concerns in app/models/concerns/ for behavior that genuinely belongs to the model but is logically grouped (User::Authenticatable, User::Billable)
  2. Value objects / POROs for cohesive logic operating on data (PasswordStrength, SubscriptionStatus)
  3. A new Active Record model when the "concern" is actually a missing entity (AccountClosure)
  4. Background jobs for side effects

Avoid app/services/UserService as the dumping ground — see service-object-soup.

Installs
2
First Seen
May 8, 2026
rails-antipattern-fat-model-god-object — gierd-inc/dev-skills