title: Group by part of attribute in hash
body: <p>I have a model called coverage that looks like this    </p>
  
  <pre><code>1.9.3p429 :005 &gt; Coverage.new
  =&gt; #&lt;Coverage id: nil, postcode: nil, name: nil, created_at: nil, updated_at: nil&gt;
  </code></pre>
  
  <p>Here is an example record:</p>
  
  <pre><code>1.9.3p429 :006 &gt; Coverage.find(10)
  Coverage Load (7.3ms)  SELECT "coverages".* FROM "coverages" WHERE "coverages"."id" = $1 LIMIT 1  [["id", 10]]
  =&gt; #&lt;Coverage id: 10, postcode: "N10", name: "N10 - Muswell Hill", created_at: "2013-05-22 14:42:37", updated_at: "2013-05-22 14:42:37"&gt;
  </code></pre>
  
  <p>I've got over 300 postcodes and I want to group them by some values I have in this array</p>
  
  <pre><code>group = ['N','E','EC','LS','TS']
  </code></pre>
  
  <p>So I would like to do</p>
  
  <pre><code>@postcodes = Coverage.all
  </code></pre>
  
  <p>run it through something with the above array to get the following hash</p>
  
  <pre><code>@postcode_hash = { 'N' =&gt; [ '#Active Record for N1', '#Active Record for N2' ], 'E' =&gt; [ '#Active Record for E1', '#Active Record for E2' ] } 
  # note: not complete should contain all index from the above array
  </code></pre>