title: Register multiple before_save conditional callbacks on Rails 4
body: <p>I have two different calculations to make on my model for two different fields. Before saving.</p>
  
  <pre><code>Class Event &lt; ActiveRecord::Base
    #some relations
    before_save :method1, unless: :some_field_1?
    before_save :method2, unless: :some_field_2?
  
    def method1
      some_field_1 = some_other_field / 2
    end
  
    def method2
      some_field_2 = some_field_1 / 3
    end
  end
  </code></pre>
  
  <p>The problem I'm having is that some_field_1 is null when method2 is called. My guess is that declaring the before_save callbacks like I'm doing is wrong. </p>
  
  <ul>
  <li>Does the second before_save overrides the first?</li>
  <li>Does the callbacks are executed in the same order in which they are declared?</li>
  </ul>
  
  <p>I know I can wrap the two methods into one without the conditionals and problem solve, but I would prefer to have the conditional callbacks. And I want to know the correct way of doing it. The docs are not pretty clear about this.</p>
  
  <p>Thanks a lot! </p>
  
  <p><strong>EDIT</strong></p>
  
  <p>For future reference. The code was Ok. The problem was somewhere else (the DB)!</p>