clowne-rb / clowne

A flexible gem for cloning models
https://clowne.evilmartians.io
MIT License
317 stars 18 forks source link

Allow access to the operation mapper in after_clone #60

Closed louim closed 3 years ago

louim commented 3 years ago

Hey! This is a revival of https://github.com/clowne-rb/clowne/pull/48, rebased on master and with a test to ensure it works. I have a complex case that needed access to the mapper before the operation was persisted. I had a go at doing an integration test as suggested by @ssnickolay in the other PR, but I was not able to create something resembling my real use case. Thus I decided to add a simple test to ensure the mapper works in after_clone.

I added @tuanmai as co-author, since he created the first PR.

closes #48