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

ActiveRecord 5.2.3 breaks 24:00:00 serialization #65

Closed
jackc opened this issue May 11, 2019 · 3 comments
Closed

ActiveRecord 5.2.3 breaks 24:00:00 serialization #65

jackc opened this issue May 11, 2019 · 3 comments

Comments

@jackc
Copy link
Owner

jackc commented May 11, 2019

  1) Failure:
TimeOfDay with ActiveRecord Serializable Attribute::.load#test_0004_dump 24:00:00 and get it back [/home/jack/dev/tod/test/tod/time_of_day_serializable_attribute_test.rb:61]:
--- expected
+++ actual
@@ -1 +1 @@
-#<Tod::TimeOfDay:0xXXXXXX @hour=24, @minute=0, @second=0, @second_of_day=86400>
+#<Tod::TimeOfDay:0xXXXXXX @hour=0, @minute=0, @second=0, @second_of_day=0>

Works fine with ActiveRecord 5.2.2. Not sure what they changed.

@stevenheffner
Copy link

What did you end up doing about this?

@jackc
Copy link
Owner Author

jackc commented Jun 21, 2019

I ran into this while testing something else and recorded it here for future reference but I have not found a solution.

@jackc
Copy link
Owner Author

jackc commented Mar 6, 2021

I just released a new version that uses ActiveRecord attributes instead of serialize. This seems to resolve this.

@jackc jackc closed this as completed Mar 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants