Actions
Patch #33367
closedUse more efficient "exists?" instead of "first" in tests when checking the existence of rows
Patch #33367:
Use more efficient "exists?" instead of "first" in tests when checking the existence of rows
Description
When you check if any row exists, using exists? that does not return ActiveRecord objects is more efficient than using first.
The attached patch replaces first with exists?.
Files
Actions