Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register service:store in an initializer instead of an instanceInitia… #3349

Merged
merged 1 commit into from
Jun 16, 2015

Conversation

bmac
Copy link
Member

@bmac bmac commented Jun 15, 2015

…lizer

This fixes #3342.

Basically it moves the registering of service:store into an initializer so users don't need to worry about making sure their instance initializers are run after the ember-data instance initializer.

The reason why we didn't do this initially is because it causes extra deprecation warnings when users try load custom stores from app/store.js or app/stores/application.js.

Custom Store in app/store.js (Deprecated Path 1)

screen shot 2015-06-15 at 4 48 29 pm

Custom Store in app/stores/application.js (Deprecated Path 2)

screen shot 2015-06-15 at 4 53 07 pm

Custom Store in app/services/store.js (Happy Path)

screen shot 2015-06-15 at 4 53 57 pm

@bmac bmac added 1.0 and removed 1.0 labels Jun 16, 2015
bmac added a commit that referenced this pull request Jun 16, 2015
Register service:store in an initializer instead of an instanceInitia…
@bmac bmac merged commit 0ce3ea7 into emberjs:master Jun 16, 2015
@bmac bmac deleted the store-initializer branch June 16, 2015 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Uncaught Error: Cannot re-register: service:store, as it has already been resolved.
2 participants