title: Ruby On Rails: How can I sort this hash by its keys in descending order
body: <pre><code>(rdb:60) p resultsHash
  { 1 =&gt; [#&lt;Participant id: 6, username: "player2", online_rank: 7, created_at: "2011-05-14 04:49:22", updated_at: "2011-05-14 04:57:56", win_count: 1, device_type: "iPad"&gt;], 
    0 =&gt; [#&lt;Participant id: 5, username: "player1", online_rank: 3, created_at: "2011-05-12 02:47:50", updated_at: "2011-05-12 02:47:50", win_count: 0, device_type: "iPad"&gt;, 
          #&lt;Participant id: 4, username: "iPhone4Simulator", online_rank: 4, created_at: "2011-05-12 02:45:37", updated_at: "2011-05-12 02:45:37", win_count: 0, device_type: "iPad"&gt;]}
  </code></pre>
  
  <p>I've tried...</p>
  
  <pre><code>resultsHash.sort {|a,b| -(a[0]&lt;=&gt;b[0])}
  </code></pre>
  
  <p>but the results aren't sorted by the keys when I iterate through the hash using <code>each_pair</code>.  </p>
  
  <p>Thanks!</p>