rails-antipattern-service-object-soup
Installation
SKILL.md
Antipattern: Service Object Soup
The smell
app/services/full of verb-named*Serviceclasses (CreateUserService,UpdateUserService,SendWelcomeEmailService)- Each has
def self.call(...)ordef initialize; def call - Models are inert — services orchestrate every change
- Tests stub the service collaborators rather than exercising the model
- Discoverability: "where does X happen?" → "search
services/"
Why it hurts
- Models become anemic (anemic-domain-model)
- Verb-named classes don't compose — DI gymnastics needed to chain them
- Encourages procedural code in OO clothing
- DHH/Manrubia: "Vanilla Rails is plenty." Concerns + POROs + AR verbs cover most cases