Project

General

Profile

Refactor #19002

Use ApplicationRecord instead of ActiveRecord::Base

Added by Lukas Zapletal over 4 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Branch:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Because Rails 5 will require apps to use ApplicationRecord and because this makes things easier for us to redirect orchestration log messages from sql to orch logger, we are making a change in core and introducing this class (#13772).

Most ActiveRecord::Base use must be replaced, specifically:

app/model/ - model classes
db/migrate/ - "fake" reopened classes otherwise TypeError: superclass mismatch for class XYZ
test/ - reopened classes otherwise TypeError: superclass mismatch for class XYZ

Such an example change can be seen in https://github.com/theforeman/foreman/pull/3729


Related issues

Related to Foreman - Bug #13772: The orchestration code uses SQL loggerClosed2016-02-17

Associated revisions

Revision 15857118 (diff)
Added by Lukas Zapletal over 4 years ago

Fixes #19002 - introduced ApplicationRecord

History

#1 Updated by Lukas Zapletal over 4 years ago

  • Related to Bug #13772: The orchestration code uses SQL logger added

#2 Updated by Lukas Zapletal over 4 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

#3 Updated by John Mitsch over 4 years ago

  • Tracker changed from Support to Refactor
  • Legacy Backlogs Release (now unused) set to 250
  • Pull request https://github.com/Katello/katello/pull/6700 added

Also available in: Atom PDF