You've got a Sinatra on your Rails
summary
Builds Sinatra features into Rails and demonstrates they actually work: a single-file Rails app (~27 lines) boots and responds, a rails_natura 75 lines implementation exposes Sinatra-style get/post routes and mounts as a Rack app, middleware logging shows requests traverse at least three middleware stacks (web server, Rails app, controller), and replacing the ActionView context lets templates execute in the controller so controller methods are available in views without declaring helpers — all examples run successfully.
AI-written summary · about
chapters (10)
- 0:00Intro
- 0:47Hacking Rails for fun and profit
- 2:22Single-file Rails apps
- 7:13class Application Rails:: Application
- 14:02Rack and the Rails router
- 23:08Middleware stacks
- 29:34Rendering stack
- 29:51class MyApp Sinatra::Base def hello "Hello World!" end end
- 33:23View paths hold filesystem paths finding templates
- 34:14View paths hold resolvers








