Jade Hamel
Jade Hamel

Reputation: 1420

How to skip versioning using Paper Trail on a model using has_paper_trail?

I have to update a table with missing data from an importation. And I don't want paper trail to version this update. How can I skip the versioning for this one time execution without removing has_paper_trail from my model?

Upvotes: 0

Views: 1412

Answers (2)

HungryCoder
HungryCoder

Reputation: 7616

In latest version, however, you can do it like

PaperTrail.request.disable_model(YourModel)

Official Doc

Upvotes: 1

Jade Hamel
Jade Hamel

Reputation: 1420

I have found the answer:

Model.paper_trail_off!

Upvotes: 1

Related Questions