12 ms·
If you are talking about ActiveRecord methods, `find_by_id(123)` or `find_by("id", 123)` are a little bit wrong both, you should use a simple `find(123)`
by resca79 12y ago
If you are talking about ActiveRecord methods, `find_by_id(123)` or
`find_by("id", 123)` are a little bit wrong both, you should use a simple `find(123)`
- venus 12y agofind_by_id/find_by aren't "wrong", they're just different. Sometimes you want to fall back to nil instead of raising an exception.