Hi, I have CourseEnrollmentRoute and CourseEnrollmentController. This basically means I am trying to enroll certain users to a particular course. Thus, this route should have the users as its model. Here is the model hook of CourseEnrollmentRoute
model: function() {
var users = this.store.find("user"); }
I trainsition to this route, from the courses page, which has a list of courses. Thus I use tranisitionToRoute with the model as the particular course the user clicks on.
enrollCourse: function(params) {
var course = this.store.find("course", params);
this.transitionToRoute("course.enrollment", course);
}
Now, in my CourseEnrollmentController, I can only see the Users model and cannot get the course model. I need the course model to fetch the courseid to do a POST.
What is the best way to access both these models in my enrollment controller?