Use strings for class_name
As mentioned in the Rails console: DEPRECATION WARNING: 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.
This commit is contained in:
@@ -34,7 +34,7 @@ class Budget < ApplicationRecord
|
||||
has_many :groups, dependent: :destroy
|
||||
has_many :headings, through: :groups
|
||||
has_many :lines, through: :ballots, class_name: "Budget::Ballot::Line"
|
||||
has_many :phases, class_name: Budget::Phase
|
||||
has_many :phases, class_name: "Budget::Phase"
|
||||
|
||||
has_one :poll
|
||||
|
||||
|
||||
Reference in New Issue
Block a user