Skip to content

Conversation

ralmidani
Copy link

From my experience in my app, the pluralization of the relation key happens inside the "data" array, on the value for "type", and not on the outer "home_town" key inside "relationships".

Edit: The behavior I describe above is what the Ember-Data JSONAPIAdapter expects, so the correction is simply related to documentation, not implementation.

From my experience in my app, the pluralization of the relation key happens inside the "data" array, on the "type" key, and not on the outer "home_town" key inside "relationships".
@jsenecal
Copy link
Member

@ralmidani , the name of the relationship itself has nothing to do with pluralization. It is defined by the model fields names. In a sense, you are correct to understand that the pluralization of the relation key happens inside the "data" array, on the "type" key but this documentation fix has nothing to do with that as the actual demonstration is properly depicted in the example code ("type": "home_town" vs "type": "home_towns")

Maybe adding some other pointers could help, but not that one precisely.

@jsenecal jsenecal closed this Dec 11, 2015
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