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

Document ams model #1873

Closed
wants to merge 3 commits into from
Closed

Conversation

aldreth
Copy link
Contributor

@aldreth aldreth commented Aug 5, 2016

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.

aldreth added 2 commits August 4, 2016 21:15
And remove duplicated check in `read_attribute_for_serialization`
@mention-bot
Copy link

@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
@bf4
Copy link
Member

bf4 commented Aug 5, 2016

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
Copy link
Member

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?

@aldreth
Copy link
Contributor Author

aldreth commented Aug 6, 2016

@bf4 Thanks for your comments. I'm off on holiday for 2 weeks now. I'll pick this up when I come back.

@bf4
Copy link
Member

bf4 commented Nov 26, 2016

@aldreth would still love some help here

@bf4
Copy link
Member

bf4 commented Nov 26, 2016

Mobile.... Sorry, missed 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants