Skip to content

Conversation

@ewoutkleinsmann
Copy link

I didn't look it up in the source, but it appears that, as with attributes, 'key' should be used to change the JSON key and not 'root'.

I didn't look it up in the source, but it appears that, as with attributes, 'key' should be used to change the JSON key and not 'root'.
@spastorino
Copy link
Contributor

key https://github.com/rails-api/active_model_serializers/blob/master/lib/active_model/serializer/associations.rb#L45 is the one used when serializing ids. root is the right now.
The whole thing needs documentation and probably we would need to change the names at some point.

@spastorino spastorino closed this Dec 23, 2013
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.

2 participants