-
Notifications
You must be signed in to change notification settings - Fork 899
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
restored version uses old updated_at #357
Comments
I also tried adding this field to the "ignore" fields |
You didn't change any values on the record, which is why the updated it isn't getting timestamped. Are you saying that you desire for the value to be touched at the time you save the restored version? Hmm... it might make sense. But |
Not necessarily. Consider this example (only one field "description")
in the rails console:
Conclusion: although activerecord clearly detects changes to the record, the timestamps are set to the corresponding values of the restored record. |
Oh... hmm, I see... So perhaps |
Indeed:
activerecord does not expect you to change "updated_at" |
Thanks for catching and reporting this. Should be fixed by eb36d1a |
when I do the following...
...the value of "updated_at" is not the current time,
but the time of the old version. This is also reflected
in the sql output.
This indeed restores the record to its old state.
But then again, after every restore, papertrail
stores the restored version, with the current
timestamp in the versions table. Why then is this not applied to the
restored record?
I tried adding "updated_at" to the "skip" fields,
but that results in the field becoming "nil".
any idea?
The text was updated successfully, but these errors were encountered: