I think the place you’ll want to start is in the Customizing Adapters section of the guides. If you’re getting comfortable with that, then you could dig into the API docs a little bit. It’s this hook that actually translates the findAll
and rental
into GET /rentals
. It’s actually a giant switch statement if you look under the hood:
// From https://github.com/emberjs/data/blob/v2.3.0/addon/-private/adapters/build-url-mixin.js#L52
buildURL: function(modelName, id, snapshot, requestType, query) {
switch (requestType) {
case 'findRecord':
return this.urlForFindRecord(id, modelName, snapshot);
case 'findAll':
return this.urlForFindAll(modelName);
case 'query':
return this.urlForQuery(query, modelName);
case 'queryRecord':
return this.urlForQueryRecord(query, modelName);
case 'findMany':
return this.urlForFindMany(id, modelName, snapshot);
case 'findHasMany':
return this.urlForFindHasMany(id, modelName);
case 'findBelongsTo':
return this.urlForFindBelongsTo(id, modelName);
case 'createRecord':
return this.urlForCreateRecord(modelName, snapshot);
case 'updateRecord':
return this.urlForUpdateRecord(id, modelName, snapshot);
case 'deleteRecord':
return this.urlForDeleteRecord(id, modelName, snapshot);
default:
return this._buildURL(modelName, id);
}
}