~/talk

Do Your Views Know Too Much?

Talkat RailsConf 2017 · 2017-04-25..04-27· [ruby-on-rails, frontend-architecture]
slides:none on file

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

  1. 0:00Intro
  2. 0:28About Jason
  3. 2:26Your Views Know Too Much
  4. 4:22How Did We Get There
  5. 6:00Code Smells
  6. 9:16Unit Level
  7. 11:05Helpers
  8. 13:45Decorators
  9. 17:01decorator objects
  10. 18:49conditionals
  11. 22:35Questions
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.