4 ms·
It might come from the pervasive use of metaprogramming / DSLs in Rails and many other Ruby libraries.
by cmelbye 5y ago
It might come from the pervasive use of metaprogramming / DSLs in Rails and many other Ruby libraries.
- weaksauce 5y agoI think rails should have explained a bit more about what rails does... every single rails method call like has_one or belongs_to inside a controller is just a method call that sets up a few methods based on the name of the thing you pass into it. not that much magic there. it's just ruby. in fact the single best thing to know that they are not some spooky things to be feared but they are just simple method calls outside the scope of a method. class Foo; puts "foo.rb was parsed"; end is a simple example of nothing is really special.