Patch #38975
closedUse ApplicationRecord instead of ActiveRecord::Base
0%
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
      
      Updated by Mizuki ISHIKAWA about 2 years 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.
      
      Updated by Go MAEDA almost 2 years ago
      
    
    - File 38975-v2.patch 38975-v2.patch added
 - Target version set to 6.0.0
 
Updated the patch for the current trunk.
Setting the target version to 6.0.0.
      
      Updated by Mischa The Evil almost 2 years ago
      
    
    Thanks for scheduling this. It gets a +1 from me too. IMHO this change is long overdue.
      
      Updated by Marius BĂLTEANU almost 2 years ago
      
    
    - Subject changed from Use ApplicationRecord to Use ApplicationRecord instead of ActiveRecord::Base
 - Assignee set to Marius BĂLTEANU
 
      
      Updated by Marius BĂLTEANU almost 2 years ago
      
    
    - Status changed from New to Resolved
 
Committed, thanks!
      
      Updated by Marius BĂLTEANU almost 2 years ago
      
    
    - Status changed from Resolved to Closed