'How to capture record versions by PaperTrail on bulk insert in Ruby on Rails?

I use Paper Trail gem to capture versions of my models and it works very nicely. But Paper Trail don't capture version on bulk insert. Example:

User.bulk_import([{id: 111, balance: 19}])

Which way is good for versioning User model on bulk_import?

I thinking about create version record manually after bulk import. Not sure is it best way.

Maybe I can trigger Paper Trail to create version on bulk_import. I like this way but don't know hot to do this.

Thank you!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source