title: Rails Sort Array By Two Columns
body: <p>Let's say I have an array called <code>surveys</code> that's made up of <code>Survey.all</code></p>
  
  <p>Each survey model has a <code>length</code> and <code>cost</code> columns.</p>
  
  <p>What's the best way to sort an array first on <code>length</code>, and then on <code>cost</code>.</p>
  
  <p>I basically want to do something similar to <code>Survey.all.order(length: :desc, cost: :asc)</code> but on the array after it's created.</p>