title: where conditions on active record rails 3
body: <p>I'm trying to add a conditional where only records that meet the condition are grabbed from the Model. For example, I'm trying to only grab records from the Transaction model where the <code>:price</code> is either greater than or not equal to 0 (I've tried > and != but neither worked in the example below).</p>
  
  <pre><code>price = Transaction.where(:company_id =&gt; company).where(:price != 0.00)
  </code></pre>
  
  <p>I've also tried this:</p>
  
  <pre><code>price = Transaction.where(:company_id =&gt; company).where(:price != 0.00).collect{|item| if item.price.to_f &gt; 0.00 {item.price.to_f} end}
  </code></pre>
  
  <p>...as well as other variations of the two above that did not work.</p>
  
  <p>The first example above doesn't produce an error but simply does not work. The condition is ignored. The second example produces a syntax error.</p>
  
  <p>I'm also pretty sure there's a way to do this using conditionals in SQL but don't have any idea how to go about that.</p>
  
  <p>Any suggestions?</p>