izelnakri / paper_trail

Track and record all the changes in your database with Ecto. Revert back to anytime in history.
https://hex.pm/packages/paper_trail
MIT License
565 stars 92 forks source link

Use model_key for insert in strict mode and add initial_version_key #146

Closed ottobar closed 3 years ago

ottobar commented 3 years ago

The model key was hardcoded to :model in the strict mode branch of PaperTrail.Multi.insert/3 and was modified to use the model_key variable.

ottobar commented 3 years ago

Also realized that :initial_version was hardcoded, so added an option for that as well.

izelnakri commented 3 years ago

Hi @ottobar , looks like a nice contribution, thank you! I’ll pull, review and test this the next 2 days, meanwhile feel free to add yourself to the contributors :)