3 ms·
> Prefer map over collect, find over detect, find_all over select, size over length. This is not a hard requirement, though - if the use of the alias enhances r
by swombat 15y ago
> Prefer map over collect, find over detect, find_all over select, size over length. This is not a hard requirement, though - if the use of the alias enhances readability - it's ok to use it.
Not too sure about that... I prefer collect/detect/select/reject...
> Keep existing comments up-to-date - no comment is better than an outdated comment.
Ambiguous sentence warning!
- nakajima 15y agoUsing #find in a Rails project tends to be a mistake, especially when used on an ActiveRecord association proxy.