title: How to find the minimum value in a table column in Rails 3
body: <p>Hi lets say I have a <strong>table(ads)</strong> with a <strong>column(views)</strong><br /></p>
  
  <p><b>Views</b><br />
  2<br />
  1<br />
  4<br />
  6<br />
  3<br /><br /></p>
  
  <p>How do I find the smallest value in this column? Any easy way to do this?<br /><br />
  <hr />
  This is what I have<br /></p>
  
  <pre><code>@ads = Ad.all
  @show_this_ad = @ads.min(:views)
  </code></pre>
  
  <p>this gives me a "wrong number of arguments(1 for 0) error"</p>
  
  <hr />
  
  <pre><code>@ads = Ad.all
  @show_this_ad = @ads.minimum(:views)
  </code></pre>
  
  <p>this gives me a "undefined method error"</p>