title: ActiveRecord - check if value is null, 0 or 1
body: <pre><code>Rails 3.2.2, Ruby 1.9.2
  </code></pre>
  
  <p>I'm using MySql and there is column "MyColumn" of TINYINT type. I need to show the status of it on a page. So I created a helper method.</p>
  
  <pre><code>module MyControllerHelper
   def result(a)
      case a
        when false then 'false 0'
        when true then 'true 1'
        when blank? then 'blank or nil'
      end     
    end
  end
  </code></pre>
  
  <p>The bottom line is that it can also be empty or nil. So it doesn't work as I need. It constantly returns either <code>false 0</code> or <code>true 1</code> but never <code>blank or nil</code> even if it should do.
  What did I do wrong?</p>