title: Return ActiveRecord query as variable, not hash?
body: <p>I am doing an ActiveRecord find on a model as such</p>
  
  <pre><code>@foo = MyModel.find(:all, :select =&gt; 'year')
  </code></pre>
  
  <p>As you can see, I only need the year column from this, so my ideal output would be</p>
  
  <pre><code>["2008", "2009", "2010"]
  </code></pre>
  
  <p>Instead, though, I get an a hash of the models, with each one containing the year, as such:</p>
  
  <pre><code>[#&lt;MyModel year: "2008"&gt;, #&lt;MyModel year: "2009"&gt;, #&lt;MyModel year: "2010"&gt;]
  </code></pre>
  
  <p>I can loop through it as such to convert it to my ideal output:</p>
  
  <pre><code>@years = []
  for bar in @foo
      @years.push(bar.year)
  end
  </code></pre>
  
  <p>but is there a way to retrieve this result to begin with? (i.e. without going through the extra processing?). If there is not, what is a more concise way to do this processing?</p>
  
  <p>Thank you.</p>