Do Your Views Know Too Much?
summary
Argues that views know too much and shows concrete refactors: move name logic into a model method, extract view logic into helper methods and content_tag wrappers, or wrap records with Draper decorators and call decorate_collection in controllers. Demonstrates testable examples (RSpec/Minitest), contrasts helpers versus decorators, and extracts conditional link-generation into helpers instead of burying ERB conditionals. Watch if wanting runnable patterns that actually reduce view code and where each approach is applied.
AI-written summary · about
chapters (11)
- 0:00Intro
- 0:28About Jason
- 2:26Your Views Know Too Much
- 4:22How Did We Get There
- 6:00Code Smells
- 9:16Unit Level
- 11:05Helpers
- 13:45Decorators
- 17:01decorator objects
- 18:49conditionals
- 22:35Questions








