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

Add option "key" to serializer associations #984

Merged

Conversation

Rodrigora
Copy link
Contributor

Hi all

I tried to implement a solution required in #882.

I changed the each_association block parameter from name to key. I thought this is ok, since the
adapter uses this parameter to set hash keys of associations.

I also added one more test file (test/adapter/json_api/json_api_test.rb) to test JsonApiAdapter's associations keys. Please, review if it is ok.

@joaomdmoura
Copy link
Member

Awesome @Rodrigora, thank you so much for you help! ❤️
Could you please update the README, adding a small session letting ppl know about the key options and some example? 😄

@Rodrigora Rodrigora force-pushed the add-key-option-to-associations branch from a614fcc to df63b59 Compare July 5, 2015 22:48
@Rodrigora
Copy link
Contributor Author

Nice @joaomdmoura! Glad to this PR passed 😄

I added an example to README as requested.

Thank you!

@joaomdmoura
Copy link
Member

Awesome! I'm merging it @Rodrigora

joaomdmoura added a commit that referenced this pull request Jul 6, 2015
Add option "key" to serializer associations
@joaomdmoura joaomdmoura merged commit 90fb1cf into rails-api:master Jul 6, 2015
@Rodrigora
Copy link
Contributor Author

Thank you @joaomdmoura 👍

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

Successfully merging this pull request may close these issues.

None yet

2 participants