Emberに特定のモデルのカスタムREST URLを設定する方法はありますか?このモデルと同様特定モデルのカスタムREST URL
:
App.Post = DS.Model.extend({
title: DS.attr('string'),
comments: DS.hasMany('App.Comment')
});
App.Comment = DS.Model.extend({
content: DS.attr('string'),
post: DS.belongsTo('App.Post')
});
そして、このお店:
app.Store = DS.Store.extend({
revision : 11,
adapter : DS.RESTAdapter.extend({
namespace : 'rest'
})
});
私はコメントはデフォルトの動作である代わりに/rest/comments
の/rest/post/{id}/comments
経由で取得していることを望みます。
特定のモデルに対してrest-urlを設定することはできますか?
私はこの事件についてのgithubの問題を発見した:post.jsモデルファイルに直接https://github.com/emberjs/data/issues/186 –