title: Rails - map 1 to true in if statement
body: <p>I am getting a request from mobile app. They are sending a variable <code>isbookmarked</code> that can be either <code>1</code> or <code>0</code>. I am checking in if statement. </p>
  
  <pre><code>if isbookmarked
    do something
  else
    do something
  end
  </code></pre>
  
  <p>The <code>else</code> part is never executed because <code>0</code> is not recognised as <code>false</code> </p>
  
  <p>How can I achieve this?</p>