Rails on Ruby: How Ruby Makes Rails Great
summary
Rails uses Ruby metaprogramming to turn language features into concrete framework behavior: five tricks that actually ship Rails features. Examples include StringInquirer implemented with method_missing and respond_to_missing to make rails.env.production? work, controller view assigns via instance_variables plus instance_variable_get/set, callbacks built by dynamically creating methods with define_method and set_callback, Active Record dirty attributes via attribute method suffix/prefix patterns, and reversible migrations inferred with class_eval using __FILE__ and __LINE__.
AI-written summary · about
chapters (11)
- 0:00Start
- 1:55Rails on Ruby: How Ruby Makes Rails Great
- 2:255 Ruby tricks in the Rails codebase
- 3:12String Inquirer
- 9:21Encapsulates knowledge of internals
- 10:32View Assigns
- 16:14Callbacks
- 20:40Dirty
- 29:45Makes reversible migrations very easy
- 30:44The "Look up Definition" IDE button
- 34:51Developer experience








