Howard H Fri Dec 23 16:24:08 -0500 2011

Subject: callback documentation suggestion

Based on debugging the after_save and after_update callbacks it seems that the _save callbacks are called for ALL save operations. This seems obvious if you look at the callbacks and documentation after you understand it, but I think there's an opportunity to clarify the documentation assuming callbacks are run in the order listed in the documentation

=======================
When more than one callback is valid for an operation, the callbacks run in the order listed below:

before_save: called before a model is saved (runs before both create and update callbacks)
before_validation: called before running validators (runs before both create and update validation callbacks)

after_save: called after a model is saved (runs before both create and update callbacks)
after_validation: called after running validators (runs before both create and update validation callbacks) ========================
  • Note I'm not sure if the validation callbacks behave the way described above, I am assuming that the callbacks are consistent in that fashion.