Closed LBRapid closed 10 years ago
You define the route for viewing an individual post like the following:
Blorgh.Router.map ()-> @resource 'post', path: '/posts/:id'
This route is not incorrect in and of itself, but it won't automatically try to use the find method defined on the post model. For that to happen, it needs to be defined using :post_id rather than :id, like so:
:post_id
:id
Blorgh.Router.map ()-> @resource 'post', path: '/posts/:post_id'
More info in the dynamic segments section of the ember routing guide at http://emberjs.com/guides/routing/defining-your-routes/
Otherwise, this is a really awesome guide :+1: Great introduction to another JS framework for me.
ignore this, I opened a pull request instead
You define the route for viewing an individual post like the following:
This route is not incorrect in and of itself, but it won't automatically try to use the find method defined on the post model. For that to happen, it needs to be defined using
:post_id
rather than:id
, like so:More info in the dynamic segments section of the ember routing guide at http://emberjs.com/guides/routing/defining-your-routes/
Otherwise, this is a really awesome guide :+1: Great introduction to another JS framework for me.