Chapter 4. Controllers
Controllers put the C in MVC and are a fundamental part of the Rails framework. However, the relationship that many Rails programmers have with controllers is complex.
On one hand, controllers are categorically loathed, with most Rails programmers having the goals that as little code as possible should go into controllers and that controllers should all be pretty much the same auto-generated scaffolding.
On the other hand, there is an intense focus on controllers—so much so that the aforementioned goals have been an immense source of abstraction and innovation in Rails, allowing programmers to write more functionality with less code.
In fact, in the 2.x Rails releases, the most fundamental changes came to controllers ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access