Don't use class as class_name in associations
- Subject changed from Don't use class name in associations to Don't use class as class_name in associations
- Related to Refactor #20956: Passing a class as a value in an Active Record query is deprecated added
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.
- Pull request https://github.com/theforeman/foreman/pull/4862 added
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
- Related to Bug #23019: Don't pass class object to :class_name in relations added
Also available in: Atom