title: How do I get values from a ActiveRecord CollectionProxy?
body: <p>i'm having trouble looping through a collection property to get out values.</p>
  
  <p>This is my proxy</p>
  
  <pre><code>&lt;ActiveRecord::Associations::CollectionProxy [#&lt;Product id: 12, name: "test", cost_in_cents: 4400, created_at: "2014-10-31 17:18:58", updated_at: "2014-10-31 17:18:58", subscription: nil, product_type: "One Time"&gt;, #&lt;Product id: 14, name: "aggg", cost_in_cents: 1400, created_at: "2014-10-31 17:28:19", updated_at: "2014-10-31 17:28:19", subscription: nil, product_type: "One Time"&gt;]&gt;
  </code></pre>
  
  <p>I want to be able to loop through all of the objects in the proxy like this.</p>
  
  <pre><code>my_collection_proxy.each do |c| c.name end
  </code></pre>
  
  <p>But that doesn't seem to be working.  How do I get the value of each name in the proxy?</p>
  
  <p>Output:</p>
  
  <pre><code>@order.products.each do |a| a.name end
  =&gt; [#&lt;Product id: 12, store_front_id: 8, name: "test", cost_in_cents: 4400, created_at: "2014-10-31 17:18:58", updated_at: "2014-10-31 17:18:58", subscription: nil, product_type: "One Time"&gt;, #&lt;Product id: 14, store_front_id: 8, name: "aggg", cost_in_cents: 1400, created_at: "2014-10-31 17:28:19", updated_at: "2014-10-31 17:28:19", subscription: nil, product_type: "One Time"&gt;]
  </code></pre>
  
  <p>What I want my output to look like:</p>
  
  <pre><code>=&gt; test
  =&gt; aggg
  </code></pre>