title: Rails Active Record - Get ids array from relation
body: <p>I'm looking for an easy/fast way of getting an array of ids from a Active Record relation.</p>
  
  <p>Currently i have:</p>
  
  <pre><code>product_ids = Product.select(:id).where(:colour =&gt; 'blue').all.map{|p|p.id}
  </code></pre>
  
  <p>But that's messy and requires a map..</p>
  
  <p>Something like this would be cooler:</p>
  
  <pre><code>product_ids = Product.where(:colour =&gt; 'blue').ids
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>Thanks :)</p>