The ember guides points do this code:
var post = App.Post.find(1);
http://emberjs.com/guides/models/finding-models/
Which worked before ember data 1.0b
How do I make this now?
Tks!
The ember guides points do this code:
var post = App.Post.find(1);
http://emberjs.com/guides/models/finding-models/
Which worked before ember data 1.0b
How do I make this now?
Tks!
See the post about migrating to ED 1.0 beta. The new syntax is like so (in the model hook):
this.store.find('author', params.author_id);
No, this doesnāt work from the chrome console.
With previous versions, App.Post.find(1) worked, now it gives me an error.
Maybe you can do something like:
window.store = App.__container__.lookup('store:main');
window.store.find('post', id);
Just for debugging in the console, but I recommend getting the Ember Inspector, that helps with debugging the data as well.
Yep, it works, thank you.
Iām not sure this is better than the old way, but works.
its better from a ādonāt leak globalsā sense, likely a loss in ergonomics. I suspect we will see some improvements here shortly.
Perhaps we could put this sort of thing into a special App.injectDebugHelpers
method
just like the App.injectTestHelpers()
method.
I could imagine something like;
> App.injectDebugHelpers()
> debug.store
> debug.routes
I too have run into difficulties accessing instances of important application objects in the debug console, so I created a short set of helpers that makes it easy:
@slindberg would you care to share those helpers?
@commadelimited apparently gist embedding isnāt working anymore. Hopefully this will work: http://git.io/dJGyvw
Thatās fantastic! Thanks for sharing. Useful indeed!