ash icon indicating copy to clipboard operation
ash copied to clipboard

Consider new name for manage_relationship :replace type

Open michaelst opened this issue 4 years ago • 2 comments

change manage_relationship(:budget, type: :replace)

This implies to me that it is going to delete and recreate the relationship instead of just linking to the existing one, may be good to consider a different nam for this

michaelst avatar Sep 25 '21 00:09 michaelst

This would be a good example of a change we could make for the 2.0 release and include in the upgrade guide

zachdaniel avatar Sep 25 '21 00:09 zachdaniel

The predefined behaviours for the manage_relationship function have always been one of the biggest sources of confusion for me, understandably because naming things is hard and manage_relationships is complex, but I'd love to see clearer names, not that I can think of any at the moment. I recall someone was making a lifecycle diagram for the Resource, it might be handy to have one for manage_relationship, showing all the possible combinations, maybe a matrix type thing.

kernel-io avatar Sep 28 '21 21:09 kernel-io

This has bee completed, its been changed to append_and_remove

zachdaniel avatar Oct 20 '22 02:10 zachdaniel