Deconstructing the framework, by Gary Bernhardt
Single Responsibility Principle - A class should have one, and only one, reason to change.
A Rails controller's reasons to change:
- Authentication
- Authorization
- Wrap HTTP in both directions (in: params & headers; out: status codes & headers)
- Manipulate your Active Record models
- Manipulate your database (
user.reload
)