Take Control8:26 with Kenneth Love
Sometimes we don't want the actual objects, or we don't want objects that are repeated. Let's see how to take control of our results.
.order_by() can accept any field or multiple fields, and can ever traverse relationships. Super handy. If you order by multiple fields, the first takes precedence and the latter fields are used only in places where the previous ones conflict.
You need to sign up for Treehouse in order to download course files.Sign up