I have a conventional Ember CLI app, and a conventional show route:
export default Ember.Route.extend({
model: function(params) {
return this.store.find('tool', params.tool_id);
}
});
But when I navigate to /tools/1, it GETs /tools instead of /tools/1! What am I doing wrong?
Extra info...
- I'm using the
--proxy http://127.0.0.1:3000
option to pass API requests to a Rails backend - The app is organized in pods
- I have no custom adapters
- I know the route is being reached because I can add
.then(function() {debugger})
to the end of the promise and it gets hit - Link to repo: https://github.com/jasonbenn/toolbus-web
The
tool
route is a parent totools.show
, so its model hook will also be hit in the process, and if thetool
by that id is already fetched, it doesn't need to call your server again fortools/1