Project

General

Profile

Refactor #21036

Don't use class as class_name in associations

Added by Anonymous about 3 years ago. Updated over 2 years ago.

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

Related issues

Related to Foreman - Refactor #20956: Passing a class as a value in an Active Record query is deprecatedClosed2017-09-16
Related to Docker - Bug #23019: Don't pass class object to :class_name in relationsReady For Testing2018-03-26
Blocks Foreman - Tracker #20948: Rails 5.1 upgrade tasksClosed2017-09-16

Associated revisions

Revision 9681a099 (diff)
Added by Michael Moll about 3 years ago

Fixes #21036 - Don't use class as class_name in associations

History

#1 Updated by Anonymous about 3 years ago

#2 Updated by Anonymous about 3 years ago

  • Subject changed from Don't use class name in associations to Don't use class as class_name in associations

#3 Updated by Anonymous about 3 years ago

  • Related to Refactor #20956: Passing a class as a value in an Active Record query is deprecated added

#4 Updated by Anonymous about 3 years ago

Rails 5.1 says:

Passing a class to the `class_name` is deprecated and will raise an ArgumentError in Rails 5.2.
It eagerloads more classes than necessary and potentially creates circular dependencies.
Please pass the class name as a string.

#5 Updated by The Foreman Bot about 3 years ago

  • Pull request https://github.com/theforeman/foreman/pull/4862 added

#6 Updated by Anonymous about 3 years ago

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

#7 Updated by Stephen Benjamin over 2 years ago

  • Related to Bug #23019: Don't pass class object to :class_name in relations added

Also available in: Atom PDF