Refreshing in Nested Route redirects to closest parent with non-dynamic model?


#1

I have a route setup like this.

this.resource(tier1) (dynamic_segment)
      this.resource(tier2) 
             this.route(tier2-Child)
             this.resource (tier2-Resource) (dynamic_segment)
                 this.route(tier3-Child1)
                 this.route(tier3-Child2)

When refreshing from a route (ex-tier2-child) within the 2nd tier resource, without a dynamic segment, everything works as expected. However when refreshing from a route (ex. refreshing from tier-3 child 1, or child2) within the 3d tier resource which does have a dynamic segment, then ember automatically redirects me to the route within the 2nd nested resource (tier-2 Child) . I am very curious as to how this behaviour might be occurring in the background and how to handle such a case where the user may wish to refresh from a roue with a dynamic segment when the segment is dynamically determined. Is it still just an implementation in the model hook? If handled properly in the model hook will the refresh stop redirecting and will the application refresh into the current nested resource?


#2

Is there more to this?


#3

Yea sorry i accidentally hit enter :smiley:


#4

Very nested question :wink: could you break the usecase down a bit more? It’s difficult to follow.


#5

Thank you for updating the description. Its still like trying to understand recursion.

Is there any chance you could replicate this in JSBin?


#6

will do :slight_smile: I won’t get to it till tomorrow probably though. Thanks for your patience


#7

No problem, I look forward to seeing the JSBin.