I have been struggling with bootstrapping an app. Specifically I am trying to bootstrap an authenticated user account. This is a Rails app and getting the serialized attributes on the model isn’t an issue however getting that data in to the store seems to be difficult.
Currently I am using ember-data revision 12. When I create a new application I don’t seem to have access to the instance of the store on the
App object. Only
App.Store which is the class. I can get to the store instance if I go through
App.__container__ but I obviously don’t want to do this.
Beyond that, I have noticed that the store does not block when being created. So when I have bootstrap code that runs after the app is created the store may or may not be available. For the time being I have created a new
Ember.Application.initializer to run and the store is available then but I would like to know if there is a better way to do this.
So to sum up:
- What is the best way to bootstrap data?
- How do I access the instance of the store from the
- What is the best way to ensure the store instance have been created before I attempt to bootstrap?