Patch #33367
closed
Use more efficient "exists?" instead of "first" in tests when checking the existence of rows
Added by Go MAEDA over 4 years ago.
Updated over 4 years ago.
Category:
Code cleanup/refactoring
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
- Subject changed from Use more efficient "exists?" instead of "first” in tests when checking the existence of rows to Use more efficient "exists?" instead of "first" in tests when checking the existence of rows
- Target version set to 4.2.0
Setting the target version to 4.2.0.
- Status changed from New to Closed
- Assignee set to Go MAEDA
Also available in: Atom
PDF