title: group_by in rails by 2 or more attributes
body: <p>I have a <code>@bunch</code> of models returned as an array</p>
  
  <p>each model has the attributes - <code>commentable_id</code> and <code>commentable_type</code> (polymorphic association)</p>
  
  <p>I want to group the models by commentable, but if I do </p>
  
  <pre><code>@bunch.group_by(&amp;:commentable)
  </code></pre>
  
  <p>it also fetches the commentable from the database, which is not needed.</p>
  
  <p>I can do <code>@bunch.group_by(&amp;:commentable_id)</code> but this will cause some confusions since there can be several types of commentable models</p>
  
  <p>Is there a way to <code>group_by</code> <code>commentable_id</code> AND <code>commentable_type</code>?</p>