Audited 4.5.0 creating an audit where attribute did not change
We are using audited 4.5.0 with Rails 5.0.6 and Ruby 2.3.5
we get some Audit table entries, recording an attribute change when the value of the attribute did not change...
:action => "update",
:audited_changes => "---\nmanager_email:\n- [email protected]\n- [email protected]\n",
Has anyone seen this kind of behavior, and are there any suggestions how to avoid this?
Hi @tilo, Is it possible that your model marks the attribute as changed or dirty even when it is not changed? Also, a new version of audited gem, 4.6.0, was released a few days ago, and it includes some improvements to change detection. Is the issue still present in that version?
I tried updating from 4.5.0 to 4.9.0 for a similar problem (audited reading #changed_attributes, which produces a false positive if same-value assignment (instance.field = instance.field) is performed), and the problem went away.