我在轨道3:中有这条线
has_many :balance_lines, :dependent => :destroy, :include => "budget_item", :order => "budget_items.position"
如何将其转换为rails 5?
这是正确的方法:
has_many :balance_lines, -> { order("budget_items.position").includes("budget_item") }, :dependent => :destroy