Hello,
I'm implementing your gem in one project (thx for wthe good work btw! ;-) ), and was wondering why you rely on after_create & update callback when creating a version.
#creation.rb line 8
after_create :create_initial_version, :if => :create_initial_version?
after_update :create_version, :if => :create_version?
after_update :update_version, :if => :update_version?
There is a rails standard feature for callback propagation between associated models , wouldn't it be more interesting to do something like that :
#creation.rb line 8
before_create :instanciate_initial_version, :if => :create_initial_version?
before_update :instanciate_version, :if => :create_version?
before_update :instanciate_version, :if => :update_version?
I'm perhaps missing something here, so let me know if you see any drawback to such evolution, but it would reduce the number of db commit and ensure that the after_commit include the last version instance ...