~/talk

Building a Rails Controller From Scratch

Talkat RailsConf 2020 CE · 2020-05-04..05-05· [ruby-on-rails]
slides:none on file

Replaces ActionController with two minimal classes and shows exactly what is implemented: a class method dispatch that instantiates and calls the action, a Parameters object with require/permit behavior, JSON rendering that sets status headers and body, controller callbacks via ActiveSupport::Callbacks, and implicit HTML rendering wired into ActionView using render_to_body. The result is two working classes (AwesomeController::Base and AwesomeController::API), tests turn green, and the talk cites the real controllers’ complexity (API ~15 modules, Base ~35) to justify the minimal approach.

AI-written summary · about

  1. 0:00Introduction
  2. 0:23Overview
  3. 4:24Response
  4. 16:38callbacks
  5. 20:41implicit rendering
  6. 22:06HTML rendering
~/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.