我正在扩展适配器:
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";
}
});
我希望适配器也能够使用要保存的记录的属性(record_A)动态设置pathForType:
return "posts/" + this.get("session.auth.uid") + "/causeRecs/" + this.get("record_A.path");
如何访问正在保存的记录的属性(record_A)?