I have done some tests, and I have find out that after_create is called before than after_save (in Rails 2.3.开发者_JS百科9)
Is that correct ?
thanks
Yes, here's the order:
# (1) before_validation
# (2) before_validation_on_create
# (3) after_validation
# (4) after_validation_on_create
# (5) before_save
# (6) before_create
# (7) after_create
# (8) after_save
Found here:
http://ar.rubyonrails.org/classes/ActiveRecord/Callbacks.html
And remember that the callback after_create is executed only time. This is difference between after_save and after_create
精彩评论