From: Andy Allan Date: Wed, 4 Oct 2023 16:53:58 +0000 (+0100) Subject: Prefer find_by() instead of where().first X-Git-Tag: live~1443^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/1700c23dd1018b66a268b4c76fcf9fb2a09a35ab?hp=1700c23dd1018b66a268b4c76fcf9fb2a09a35ab Prefer find_by() instead of where().first These are very similar, differing only if we would expect multiple results and the sorting is important. However, in all our cases we're only expecting one result to be returned, and so find_by is easier to read. ---