0

So I have a trial blog app which is pretty much like this http://emberjs.jsbin.com/conum/3/edit. In my app I use the RESTAdapter instead of the fixtures, but I have no idea how to do REST behavior in the jsbin. This is important because the issue seems to happen only when I use RESTAdapter. So here is the issue:

When I enter a resource, say the posts route, I load the posts and show the user of each post. I can navigate to the user's detail and back to the posts list just fine. When I enter the posts.create resource, I load all users to show them in a select dropdown. the problem happens when I navigate back to the posts list. the user associated with the posts are now gone!Once again this only happens only when I am using the RESTAdapter, so you wont't see the issue happening in the jsbin.

I have been dealing with this for 2 days now, is this a bug within ember? because I have tried using ember-model instead of ember-data too, and similar thing happens.. or am I doing things wrong? Any help will be much appreciated.. thanks!

Andragan
  • 41
  • 2
  • It's probably you :) hah, just messing, here's an example with the rest adapter for future, http://emberjs.jsbin.com/OxIDiVU/73/edit Can you pinpoint a few areas and add them to your question (the code) so people don't have to hunt down which area you're talking about. – Kingpin2k Mar 28 '14 at 14:29
  • @kingpin2k I cant even figure out how to make mockjax replicate what I have, now I really think its me :( sorry, I'm a real newbie with ember. here's my struggle with mockjax, I'm not sure with the url users/1 and posts/create http://emberjs.jsbin.com/conum/6/edit – Andragan Mar 30 '14 at 07:19
  • Can you post what the network is returning when your grabbing those resources? In particular, it probably has to do with when you are grabbing the list of users. You may need to sideload posts in that request, or simply reload the model on the posts page to get the user's sideloaded with the posts again so that Ember knows those relationships exist. – ianstarz Apr 04 '15 at 20:31

0 Answers0