You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.
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 8after_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 8before_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 ...
The text was updated successfully, but these errors were encountered:
itkin
changed the title
Why not using AR standard callback system instead of creating version after_update/create ?
Why not using AR standard callback propagation instead of creating version after_update/create ?
Jul 11, 2014
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
There is a rails standard feature for callback propagation between associated models , wouldn't it be more interesting to do something like that :
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 ...
The text was updated successfully, but these errors were encountered: