-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:emberjs/data into remove-passing-…
…factories-to-store-methods
- Loading branch information
Showing
36 changed files
with
464 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
packages/ember-data/lib/instance-initializers/initialize-store-service.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
Configures a registry for use with an Ember-Data | ||
store. | ||
@method initializeStore | ||
@param {Ember.ApplicationInstance} applicationOrRegistry | ||
*/ | ||
export default function initializeStoreService(applicationOrRegistry) { | ||
var registry, container; | ||
if (applicationOrRegistry.registry && applicationOrRegistry.container) { | ||
// initializeStoreService was registered with an | ||
// instanceInitializer. The first argument is the application | ||
// instance. | ||
registry = applicationOrRegistry.registry; | ||
container = applicationOrRegistry.container; | ||
} else { | ||
// initializeStoreService was called by an initializer instead of | ||
// an instanceInitializer. The first argument is a registy. This | ||
// case allows ED to support Ember pre 1.12 | ||
registry = applicationOrRegistry; | ||
container = registry.container(); | ||
} | ||
// Eagerly generate the store so defaultStore is populated. | ||
var store = container.lookup('store:application'); | ||
registry.register('service:store', store, { instantiate: false }); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.