Add comments

It's best to use the ActiveRecord "order" method, so that the sorting occurs in the database. sort_by will use Ruby to do the sorting, which is slower and not the best practice.