title: Stop ActiveRecord saving a serialized column even if not changed
body: <p>This is very similar to <a href="https://stackoverflow.com/questions/7448083/rails-partial-updates-problem-with-hashes">Rails partial updates problem with hashes</a> , but the question has not really been answered IMHO.</p>
  
  <p>The problem is this: I have a model with a serialized column:</p>
  
  <pre><code>class Import &lt; AR::Base
    serialize :data
  </code></pre>
  
  <p>In my case, this data will, and should, not change after the first save/creation of the model. So I want to disable the feature of AR that always saves serialized columns (which is normally a good idea, as it can't detect those changes). I want to disable the saving because the data can be quite large, and the model will be updated frequently.</p>
  
  <p>I've already tried monkeypatching into ActiceRecord::AttributeMethods::Dirty like this:</p>
  
  <pre><code>class Import
    def update(*)
      if partial_updates?
        super(changed | (attributes.keys &amp; (self.class.serialized_attributes.keys - ["data"])))
      else
       super
     end
   end
  </code></pre>
  
  <p>but this seems to have no effect. Anybody got a better idea ?</p>
  
  <p>This is under Rails 3.0.12</p>