Project

General

Profile

Actions

Refactor #19003

closed

Use ApplicationRecord instead of ActiveRecord::Base

Added by Lukas Zapletal almost 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Category:
Discovery plugin
Difficulty:
Triaged:
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 2 (0 open2 closed)

Related to Foreman - Bug #13772: The orchestration code uses SQL loggerClosedLukas Zapletal02/17/2016Actions
Related to Discovery - Bug #20051: foreman_discovery 9.1.0 is not compatible with Foreman 1.15.xClosed06/19/2017Actions
Actions #1

Updated by Lukas Zapletal almost 8 years ago

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

Updated by The Foreman Bot almost 8 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Lukas Zapletal
  • Pull request https://github.com/theforeman/foreman_discovery/pull/334 added
Actions #3

Updated by Anonymous over 7 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #4

Updated by Anonymous over 7 years ago

  • Related to Bug #20051: foreman_discovery 9.1.0 is not compatible with Foreman 1.15.x added
Actions

Also available in: Atom PDF