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
Rails 3.2.12 breaks to_yaml for dependent active record objects #9263
Comments
@tenderlove this is the bug I was bugging you in the bar at rubyconfau about :) I've got a test that fails within our application which I've gisted up at https://gist.github.com/joho/5d3225cd6c0608d39921 I'm happy to convert it to a proper rails test if someone wants to point me to where they think that test belongs. |
I just pulled down 3-2-stable into our app and re-run the test case I had above and it fixes it for me. |
Thanks @joho. I'm giving this a close, please anyone let us know if you still find this is a bug in 3-2 or master. |
Cool. 👍. @clausd if you see something different please let me know. |
ahahahahha github |
😄 |
Due to v3.2.11...v3.2.12#L11R54 serialization of dependent active record objects using yaml seems to fail.
Arel::Nodes::SqlLiteral hides String.count, which breaks the serialization in the same fashion reported here rails/arel#149
Where I've encountered this a workaround has been to load the affected record with find, instead of by traversing a relation, i.e.
Child.find(parent.child_id) instead of parent.child
The text was updated successfully, but these errors were encountered: