Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to restore with original id? #591

Open
IanVaughan opened this issue Jul 5, 2021 · 0 comments
Open

How to restore with original id? #591

IanVaughan opened this issue Jul 5, 2021 · 0 comments

Comments

@IanVaughan
Copy link

I was looking to restore some records, and found I had to do this little dance to get the record saved with the original ID:

Audited::Audit.where(action: "destroy").revision.update!(id: found.auditable_id)

Is that the intended method or am I doing something wrong?

Similar to :

you could no longer restore a record to its original state (with original id). That isn't a design goal of Audited, but I do think it is something people use it for.

#294 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant