Created
October 1, 2013 14:55
-
-
Save commadelimited/6779774 to your computer and use it in GitHub Desktop.
Nested URLs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'm trying to consume an endpoint from my server to retrieve interactions. | |
This interaction is restricted by account and can only be accessed once you're within the account route. | |
URLs | |
---- | |
/activity/#/accounts/64/ <-- loads account information | |
/activity/#/accounts/64/interactions <-- I want to load interactions here | |
Ember is making a call to the interactions endpoint, but it's hitting the wrong path: | |
API | |
--- | |
/api/1/interactions/ <-- what Ember is hitting | |
/api/1/accounts/64/interactions/ <-- what Ember should be hitting | |
Is there something I can do to alter the endpoint that Ember is trying to hit? Below are the details on my stack: | |
DEBUG: Ember.VERSION : 1.0.0-rc.8 | |
DEBUG: Ember.Data.VERSION : r13 | |
DEBUG: Handlebars.VERSION : 1.0.0 | |
DEBUG: jQuery.VERSION : 2.0.3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Social.Router.map(function() { | |
this.resource('accounts', { path: '/accounts' }, function(){ | |
this.resource('account', { path: ':account_id'}, function(){ | |
this.resource('interactions', { path: 'interactions'}); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ryan, that's the question I have. How do I tell the Model where to look for it's data? Is that possible in r13?