active_record_upsert icon indicating copy to clipboard operation
active_record_upsert copied to clipboard

Granular control over lifecycle hooks

Open jesjos opened this issue 8 years ago • 7 comments

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.

jesjos avatar Feb 21 '16 20:02 jesjos

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.

benedikt avatar Aug 10 '18 09:08 benedikt

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.

olleolleolle avatar Aug 10 '18 13:08 olleolleolle

@benedikt Do you think we ought to release today? Is it a minor, so that we're at 0.10.0?

olleolleolle avatar Aug 10 '18 13:08 olleolleolle

@olleolleolle Totally up to you. It’ll most likely take me a few days until I get to work on the callbacks.

benedikt avatar Aug 10 '18 16:08 benedikt

@benedikt Just a check - we're still not yet in "backwards-compat break", are we?

olleolleolle avatar Aug 11 '18 05:08 olleolleolle

The recent changes only fixed two issues, no backwards incompatible changes, yet.

benedikt avatar Aug 11 '18 07:08 benedikt

@benedikt I released v0.9.2.

olleolleolle avatar Aug 13 '18 16:08 olleolleolle