title: rails active record: update a table with join
body: <p>I'm working on a rails project.
  I have two tables storing data from disparate systems: tasks and projects.</p>
  
  <p>With a condition, Projects knows Tasks through ref_id, but not in the opposite direction.
  so, once matches found from a join, I'd like to set task.project_id with the matched Projects table's id.</p>
  
  <pre><code>UPDATE FROM task AS t
  LEFT JOIN projects as p
  ON t.ref_id = p.ref_id
  SET t.project_id = p.id
  </code></pre>
  
  <p>my question here is: how can I achieve this using active record in rails?</p>