5

升级到 Ember.js RC2 后,我收到以下弃用警告:

DEPRECATION: register("store", "main") is now deprecated in-favour of register("store:main");

我必须在这个最小的应用程序中进行哪些更改才能修复它?

App = Ember.Application.create();

App.Store = DS.Store.extend({
  revision: 11,
  adapter: 'DS.FixtureAdapter'
});
4

1 回答 1

4

安装最新版本ember-data.js并将代码更新为:

App = Ember.Application.create();

App.Store = DS.Store.extend({
  revision: 12,
  adapter: 'DS.FixtureAdapter'
});

解决了这个问题。谢谢@finn-maccool!

于 2013-04-02T12:53:22.740 回答