プロジェクト

全般

プロフィール

Vote #81847

完了

Replace Member.find_or_new with ActiveRecord's find_or_initialize_by

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Code cleanup/refactoring_30
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
30
version_id:
155
issue_org_id:
36730
author_id:
332
assigned_to_id:
332
comments:
4
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

@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


journals

--------------------------------------------------------------------------------
In r21447, I already replaced some @Member.find_or_new@.
--------------------------------------------------------------------------------
Setting the target version to 5.0.0.
--------------------------------------------------------------------------------
Committed the patch.
--------------------------------------------------------------------------------


related_issues

relates,Closed,36696,Improve performance of adding or removing members of a group

Admin Redmine さんが3年以上前に更新

  • カテゴリCode cleanup/refactoring_30 にセット
  • 対象バージョン5.0.0_155 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0