title: how to update a record without worrying about primary key
body: <p>In ActiveRecord how can we update a record without worrying/knowing primary key. </p>
  
  <p>If I do </p>
  
  <pre><code>Address.update(15, :user_name =&gt; 'Samuel')
  </code></pre>
  
  <p>it corresponds to </p>
  
  <pre><code>UPDATE addresses set user_name = 'Samuel' where id = 15
  </code></pre>
  
  <p>but what if i want to do:</p>
  
  <pre><code>UPDATE addresses set user_name = 'Samuel' where cid = 15
  </code></pre>
  
  <p>what will be the ActiveRecord equivalent of that??</p>
  
  <p>I tried:</p>
  
  <pre><code>Address.update({:cid =&gt; 15}, :user_name =&gt; 'Samuel')
  </code></pre>
  
  <p>but that does not work. </p>