Ember.js 使用pathForType的Ember适配器动态路径

Ember.js 使用pathForType的Ember适配器动态路径,ember.js,ember-data,Ember.js,Ember Data,我正在扩展一个适配器: import config from '../config/environment'; import Firebase from 'firebase'; import Ember from 'ember'; import ApplicationAdapter from './application'; export default ApplicationAdapter.extend({ pathForType: function(type) { return

我正在扩展一个适配器:

import config from '../config/environment';
import Firebase from 'firebase';
import Ember from 'ember';
import ApplicationAdapter from './application';

export default ApplicationAdapter.extend({
  pathForType: function(type) {
    return "posts/" + this.get("session.auth.uid") + "/causeRecs";
  }
});
我希望适配器还能够使用要保存的记录(记录a)的属性动态设置pathForType:


如何访问正在保存的记录(记录A)的属性?

为什么要这样做?在保存或创建记录时,是否要将
path
附加到url?
return "posts/" + this.get("session.auth.uid") + "/causeRecs/" + this.get("record_A.path");