4 ms·
Dynamic finders in Rails 3.1's ActiveRecord: http://git.io/hdb0QA http://git.io/hdb0QA
by jbackus 12y ago
Dynamic finders in Rails 3.1's ActiveRecord: http://git.io/hdb0QA http://git.io/hdb0QA
- MichaelGG 12y agoI'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)?