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 almost 4 years ago. Updated almost 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 #1

Updated by Go MAEDA almost 4 years ago

  • 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
Actions #2

Updated by Go MAEDA almost 4 years ago

  • Target version set to 4.2.0

Setting the target version to 4.2.0.

Actions #3

Updated by Go MAEDA almost 4 years ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA

Committed the patch.

Actions

Also available in: Atom PDF