Skip to content

Commit

Permalink
Prefer the new injection methods.
Browse files Browse the repository at this point in the history
This way Ember Data won't log deprecation warnings when emberjs/ember.js#12157 lands in Ember.
  • Loading branch information
bmac committed Aug 20, 2015
1 parent 1ed437a commit 54ca166
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/ember-data/lib/initializers/store-injections.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
export default function initializeStoreInjections(registry) {
// registry.injection for Ember < 2.1.0
// application.inject for Ember 2.1.0+
var inject = registry.injection || registry.inject;
var inject = registry.inject || registry.injection;
inject.call(registry, 'controller', 'store', 'service:store');
inject.call(registry, 'route', 'store', 'service:store');
inject.call(registry, 'data-adapter', 'store', 'service:store');
Expand Down
2 changes: 1 addition & 1 deletion packages/ember-data/lib/initializers/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function has(applicationOrRegistry, fullName) {
export default function initializeStore(registry) {
// registry.optionsForType for Ember < 2.1.0
// application.registerOptionsForType for Ember 2.1.0+
var registerOptionsForType = registry.optionsForType || registry.registerOptionsForType;
var registerOptionsForType = registry.registerOptionsForType || registry.optionsForType;
registerOptionsForType.call(registry, 'serializer', { singleton: false });
registerOptionsForType.call(registry, 'adapter', { singleton: false });

Expand Down

0 comments on commit 54ca166

Please sign in to comment.