Defining ember model associations with proper casing (doc is not clear)


#1

I had some issues in defining hasMany associations in ember model. Then I found this http://emberjs.com/guides/models/the-rest-adapter/ which gave some idea on how the return json values should be. That link is not under the guides, I had to reach that page through search engine. If someone could update that part preferably under the Model tab, it would be really really great.

I have an Rails app, have issue with Ember data in knowing the correct way to do things.

Before (Based on the doc):
I am using Rails serializer, it returns json of the form.

trips json

trips":[{"id":1,"packages_trip_ids":[1,2,3,4]}

Trip model

packagesTrips: DS.hasMany('packagesTrip')

After (Through some trial and error)

This worked!

trips json

trips":[{"id":1,"packages_trips":[1,2,3,4]}

Trip model

 packages_trips: DS.hasMany('packages_trip')

I know this is weird to use snake case here. What am i doing wrong? And this is not irregular key too.