3 ms·
For me, Rails' magic is the (now somewhat outdated) method names that were overusing `method_missing`. Stuff like `Foo.find_by_bar` When all you did was defin
by jspash 5y ago
For me, Rails' magic is the (now somewhat outdated) method names that were overusing `method_missing`.
Stuff like `Foo.find_by_bar`
When all you did was define a db table "foo" with a column "bar".
In the early days of Rails, that WAS magical! PHP certainly couldn't do that. I'm not sure how advanced Java's retrospection was in those days. But it seemed as though Ruby/Rails was the only (popular) language around at the time with that sort of trick up its sleeve.