I’m having a little trouble figuring this out: I have a model Machine that has a foreign key on a locations table, and I want the default scope of Machine to sort by location.name. Is this possible?
I’m having a little trouble figuring this out: I have a model Machine that
Share
Yes, use a join to your other table.
Make sure the relation you call in
joinsmatches the one defined in yourMachinemodel.