active_record_upsert
active_record_upsert copied to clipboard
Granular control over lifecycle hooks
Right now we trigger save, create and commit hooks. The create hooks might be ill-advised, since we don't know if there is an extant record.
With #75 in place, it's possible to implement this properly. However it'd be a breaking change. I'm happy to implement it, but I'd like to hear your opinion on how to handle the breaking change.
Also, I think I figured out a way to return the attributes before the upsert if a record existed already. This would be useful to figure out changes to attributes after updates.
For my money, a major version update's fine - make the break and move on - we're a small and active community of users, here.
@benedikt Do you think we ought to release today? Is it a minor, so that we're at 0.10.0
?
@olleolleolle Totally up to you. It’ll most likely take me a few days until I get to work on the callbacks.
@benedikt Just a check - we're still not yet in "backwards-compat break", are we?
The recent changes only fixed two issues, no backwards incompatible changes, yet.
@benedikt I released v0.9.2.