Project

General

Profile

Actions

Patch #36730

closed

Replace Member.find_or_new with ActiveRecord's find_or_initialize_by

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

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

0%

Estimated time:

Description

Member.find_or_new can be replaced with ActiveRecord's find_or_initialize_by introduced in Rails 4.

https://api.rubyonrails.org/classes/ActiveRecord/Relation.html#method-i-find_or_initialize_by


Files

find_or_initialize_by.patch (2.52 KB) find_or_initialize_by.patch Go MAEDA, 2022-03-06 03:38

Related issues

Related to Redmine - Feature #36696: Improve performance of adding or removing members of a groupClosedGo MAEDA

Actions
Actions

Also available in: Atom PDF