title: How update value in database table using condition?
body: <p>I need update 'status' field in table, <code>where id == question_id</code>. I tried this but it's not working:</p>
  
  <pre><code>Questions.update_all("status = status_id.to_i", 
                 ["id = question_id"])
  </code></pre>
  
  <p>I have this error:</p>
  
  <pre><code>Mysql2::Error: Unknown column 'question_id' in 'where clause': UPDATE `questions` SET status = status_id.to_i WHERE (id = question_id)
  </code></pre>