2014-03-03 1 views
0

엠버 버전을 사용하는 이동 inflectors 수행합니다 * @version 1.4 엠버 데이터 버전 : v0.14어디 엠버 레일을

내 store.js

나를 위해
DS.RESTAdapter.reopen({ 
    namespace: "api/v1" 
}); 

Lost.Store = DS.Store.extend({ 
    revision: 14, 
    adapter: DS.RESTAdapter 
}); 

작품 잘합니다. 내가 속성으로 라우팅 할 때. 내 RESTAdapter 호출은

localhost:3000/api/v1/propertys 

입니다. 난 그냥 통화에서 "속성"은 "propertys"를 변경 타다 남은 inflectors를 사용할 필요가 제외

는 케이스 가구 1 : 내 store.js에서 (가) 위의 코드 언급 한 후

var inflector = Ember.Inflector.inflector; 
inflector.irregular('property', 'properties'); 

오류

을 제공합니다
Uncaught TypeError: Cannot read property 'inflector' of undefined 

경우 위에서 언급 한 코드 뒤에 내 store.js 2

var inflector = new Ember.Inflector(); 
inflector.irregular('property', 'properties'); 

오류를

Uncaught TypeError: undefined is not a function 

경우 3 을 제공하지만 난 내 Lost.Store 전에 넣으면

나는

Uncaught TypeError: Cannot read property 'inflector' of undefined application.js:65532 
Uncaught Error: Assertion Failed: You included Ember Data but didn't define Lost.Store 

답변

0

내가 엠버을 생각하지 않는 오류를 얻을 데이터 버전 0.14에는 Ember.Inflector가 있습니다. Ember Data 버전 1.0.0.beta.6ish로 업그레이드를 시도 했습니까?