I am trying to write an Ember-Data adapter for using the Rhom JavaScript ORM for my ember app. But I have no idea what the methods like 'find', createRecord, findAll, etc should return.
Is there any reference I can follow. I really dont understand what happens in the RESTAdapter. I see that there is an Ajax call.
I am planning on using the 1.0 version of Ember Data and so I referred the Transition Readme file here https://github.com/emberjs/data/blob/master/TRANSITION.md and it says at one place:
App.MyAdapter = DS.Adapter.extend({
find: function(store, type, id) {
return $.getJSON("/" + this.pluralize(type) + "/" + id);
}
});
Does this mean I just can return whatever I want? like JSON or something?
And should I use Ember.RSVP.resolve() at the end of the methods like in https://github.com/rpflorence/ember-localstorage-adapter/blob/master/localstorage_adapter.js.
App.ApplicationAdapterinstead ofApp.MyAdapter? - Connor Leech