-
Notifications
You must be signed in to change notification settings - Fork 895
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
Zeroes in decimal columns erroneously showing up in changeset #169
Comments
I'm watching the same behaviour in my code. |
I believe this is directly related to the serialization issue raised by pull #180, and I'm going to try to merge that in before the next release. |
IIRC, ActiveRecord's type_cast code is separate from full-blown serializers, so #180 may not fix this, but maybe... |
Any chance one of you guys could provide a failing test? I attempted to write a failing test for this use case but wasn't able to do it. |
@dwwoelfel, @rubennorte - What version of I haven't done a complete thorough investigation, but I believe this change in behavior exists in |
Did some further investigation, with thanks to @TylerRick, looks like this issue should be addressed by ActiveRecord's TypeCasting code. This can be seen in ActiveRecord::ConnectionAdapters::Column. Unless someone can provide a failing test, it appears this one can be closed. |
I just noticed this issue still exists. Specifically when using quotes:
|
@kevintraver - What versions of |
paper_trail - 3.0.6 |
@kevintraver - Looks like this may be expected behavior, see rails/rails#17537. At any rate, I'm fairly certain this is not an issue of PaperTrail doing something wrong. |
Ok, thanks |
If I have a column with a zero value and I update that decimal column to zero again, paper trail creates a new version with changeset [0.0 => 0.0]
Example:
The text was updated successfully, but these errors were encountered: