Re:Why don't I metaprogram more?
by jbackus on Thursday August 14, 2014 @08:44PM
(#8180539)
Dynamic finders in Rails 3.1's ActiveRecord: http://git.io/hdb0QA
[ Parent
| on HN ]
I've seen that before, but isn't that the same theme? db.find_by_userid(123) versus user.find_by("userid", 123)?
If everything is checked dynamically, does it really make a difference beyond the 3 characters? Sure find_by_userid looks somewhat nicer, for sure. But is that really it? Any examples that aren't trivially replaced by a string param (or two)?