rails-service-objects
Installation
SKILL.md
Rails Service Object Conventions
Service objects encapsulate a single business action. They keep controllers thin and business logic testable in isolation.
Naming
Names are verb-first and describe the action performed:
| Wrong | Right |
|---|---|
UserRegistration |
RegisterUser |
PaymentProcessor |
ProcessPayment |
WelcomeEmailSender |
SendWelcomeEmail |
LoginCodeGenerator |
GenerateLoginCode |
File name mirrors the class: RegisterUser → app/services/register_user.rb.