title: How do I use update_attributes with custom setter methods in Rails?
body: <p>I have a model called <code>Contact</code> with an attribute called <code>phone_number</code>.  I have some custom setter methods such as</p>
  
  <pre><code>def prefix=(num)  
    self.phone_number[3..5] = num  
  end
  </code></pre>
  
  <p>When I call <code>@contact.update_attributes({:prefix =&gt; '510'})</code>, I don't get any errors and <code>@contact</code> gets changed, but the changes don't make their way to the database.  I've tried using <code>attr_accessible</code> to specifically allow using these setter methods to no avail.</p>
  
  <p>Is there any way to get <code>update_attributes</code> to work for me?  I'm using Rails 2.3.8.</p>