Building a Rails Controller From Scratch
summary
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








