Project

General

Profile

Actions

Patch #38975

open

Use ApplicationRecord

Added by Minoru Maeda 3 months ago. Updated 3 months ago.

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

0%

Estimated time:

Description

This patch changes the base class of the Active Record model in app/models to ApplicationRecord.

This is in accordance with the change of model inheritance from ActiveRecord::Base to ApplicationRecord in Rails 5.
Reference link: https://www.bigbinary.com/blog/application-record-in-rails-5

However, the include destination of lib/plugins/acts_as_xxx will also change from ActiveRecord::Base to ApplicationRecord when this patch is applied,
This will affect the Active Record model of Redmine plugins that use the acts_as_xxx method, and the base class will need to be changed to ApplicationRecord.

Thank you.


Files

Actions #1

Updated by Mizuki ISHIKAWA 3 months ago

+1
Since the use of ApplicationRecord has become standard practice in Rails 5 and beyond, I think it would be beneficial for Redmine to stay up-to-date with this approach.

Actions

Also available in: Atom PDF