You can just chain sort_by like Submission.where(...).sort_by(...)