Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This acceptance test error drives a lot of logic: to display the post's titl e on the show page, we need to save the post on the new page, include the ID in the transition to the show route, then load the post on the show page's model ho ok. Outer red: No model was found for 'post' With this logic added, the acceptance test errors out quickly: there _is_ no `post` model.
- Loading branch information
Josh Justice
committed
Jan 12, 2018
1 parent
cdfc232
commit 306ca7e
Showing
3 changed files
with
9 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
import Route from '@ember/routing/route'; | ||
|
||
export default Route.extend({ | ||
model(params) { | ||
return this.store.findRecord('post', params.id); | ||
} | ||
}); |