당신이 buildURL을 사용자 정의 RESTAdapter을 만들고 오버라이드 (override) 할 것, 이것은 당신이 시작 도움이
App.PeopleAdapter = DS.RESTAdapter.extend({
host: 'http://www.google.com',
namespace: 'api/v1',
/**
Builds a URL for a given type and optional ID.
By default, it pluralizes the type's name (for example,
'post' becomes 'posts' and 'person' becomes 'people').
If an ID is specified, it adds the ID to the path generated
for the type, separated by a `/`.
@method buildURL
@param {String} type
@param {String} id
@returns String
*/
buildURL: function(type, id) {
var url = [],
host = get(this, 'host'),
prefix = this.urlPrefix();
if (type) { url.push(this.pathForType(type)); }
if (id) { url.push(id); }
if (prefix) { url.unshift(prefix); }
url = url.join('/');
if (!host && url) { url = '/' + url; }
return url;
},
});