mardi 9 juin 2015

Ember navigates to a show route, GETs the wrong URL (/tools instead of /tools/1)

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: http://ift.tt/1S2J327



Aucun commentaire:

Enregistrer un commentaire