-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Document ams model #1873
Document ams model #1873
Conversation
And remove duplicated check in `read_attribute_for_serialization`
@aldreth, thanks for your PR! By analyzing the annotation information on this pull request, we identified @bf4, @ggordon and @mateomurphy to be potential reviewers |
Cache now returns attributes with symbolized keys
One big problem/bug right now with ams::model is that the attributes hash doesn't sync with the attr_accessor values. This causes all sorts of problems. It's essentially and unresolved implementation detail between ActiveModel::Model and ActiveModel::Serialization. |
@@ -250,8 +250,9 @@ def test_a_serializer_rendered_by_two_adapter_returns_differently_fetch_attribut | |||
# Assert attributes are serialized correctly | |||
serializable_alert = serializable(alert, serializer: AlertSerializer, adapter: :attributes) | |||
attributes_serialization = serializable_alert.as_json | |||
assert_equal expected_fetch_attributes, alert.attributes | |||
assert_equal alert.attributes, attributes_serialization | |||
alert_attributes_symbolized = alert.attributes.symbolize_keys |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see the value of adding a test for symbolizing, but it looks like you're replacing the existing one?
@bf4 Thanks for your comments. I'm off on holiday for 2 weeks now. I'll pick this up when I come back. |
@aldreth would still love some help here |
Mobile.... Sorry, missed 😄 |
References #1283
I think this resolves 2 of your checkboxes - #1272 (comment) & #1272 (comment)
I don’t know what to do to resolve #1272 (comment) & don’t know what to put in the changelog.