title: Checking if a boolean column is true in MySQL/Rails
body: <p>Rails and MySQL:</p>
  
  <p>I have a table with several boolean columns representing tags. I want to find all the rows for which a specific one of these columns is 'true' (or I guess in the case of MySQL, '1'). I have the following code in my view. </p>
  
  <pre><code>@tag = params[:tag]
  
  @supplies = Supply.find(:all,
    :conditions=&gt;["? IS NOT NULL and ? !=''", @tag, @tag], :order=&gt;'name')
  </code></pre>
  
  <p>The @tag is being passed in from the url. Why is it then that I am instead getting all of my @supplies (i.e. every row) rather than just those that are true for the column for @tag.</p>
  
  <p>Thanks!</p>