Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Order attributes by association if it exists
Adding an order clause to the relation for an associated attribute was having no effect on the dashboard's sorting. When the order is applied, the current relation will check if the attribute is an association and reorder by count on the attribute's id column or on the relation's {attribute}_id column following the Rails convention of naming FK columns. The relation order method was changed to reorder to override any default scoping that may exist for the relation. thoughtbot#471
- Loading branch information