Project

General

Profile

Actions

Patch #33367

closed

Use more efficient "exists?" instead of "first" in tests when checking the existence of rows

Added by Go MAEDA about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Code cleanup/refactoring
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

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

Also available in: Atom PDF