avram icon indicating copy to clipboard operation
avram copied to clipboard

Always pass record to block in DeleteOperation.delete

Open matthewmcgarvey opened this issue 3 years ago • 1 comments

Right now, DeleteOperation conditionally passes the record to the block

https://github.com/luckyframework/avram/blob/9c8caecf052641d15dbe027e0cafb1741d8af33f/src/avram/needy_initializer_and_delete_methods.cr#L127-L131

Unless there's a good reason for that, it seems more ✨ ergonomic ✨ to always pass in the record.

matthewmcgarvey avatar Oct 06 '22 03:10 matthewmcgarvey

Agreed! This should match with update operations that returns the record to the block whether or not the operation succeeds.

akadusei avatar Oct 06 '22 13:10 akadusei