title: How to save a model without running callbacks in Rails
body: <p>I need to calculate values when saving a model in Rails. So I call <code>calculate_averages</code> as a callback for a <code>Survey</code> class:</p>
  
  <pre><code>before_save :calculate_averages
  </code></pre>
  
  <p>However, occasionally (and initially I have 10k records that need this operation) I need to manually update all the averages for every record. No problem, I have code like the following:</p>
  
  <pre><code>Survey.all.each do |survey|
    survey.some_average = (survey.some_value + survey.some_other_value) / 2.to_f
    #and some more averages...
    survey.save!
  end
  </code></pre>
  
  <p>Before even running this code, I'm worried the <code>calculate_averages</code> is going to get called and duplicate this and probably even cause some problems with the way I'm doing things. Ok, so then I think, well I'll just do nothing and let <code>calculate_averages</code> get called and do its thing. Problem there is, first, is there a way to force callbacks to get called even if you made no changes to the record?</p>
  
  <p>Secondly, the way averages are calculated it's <strong>far</strong> more efficient to simply not let the callbacks get called at all and do the averages for everything all at once. Is this possible to not let callbacks get called?</p>