We're almost there! There's one last piece of functionality that we need and that is for lessons. We need to be able to add them and show them. I'm logged in the classes as an instructor:
The classes page for Brad
Now, I want to have a link beside View Lesson
page that says Add Lesson
.
We're going to go to the views
| instructors
| classes.handlebars
file. In this file, I'm going to create another <th>
in the <thead>
, and then we want another td <tbody>
, like this:
<thead> <tr> <th>Class ID</th> <th>Class Name</th> <th></th> <th></th> </tr> </thead> <tbody> {{#each instructor.classes}} <tr> <td>{{class_id}}</td> <td>{{class_title}}</td> <td><a href="/classes/{{class_id}}/lessons"...