Closed justwes2 closed 7 years ago
Actually, only if you have include :event
on your back end in the create method of your attendance controller does the second change make sense.
console.log(attendance)
in the callback. we need more information here
$state.go("eventShow", {id: event.id})
// change to
$state.go("eventShow", {id: attendance.event_id})
Ran the console log, nothing popped, so the addAttendance function isn't even touched.
How come the function isn't attached?
Can we close this issue and open up a new dedicated issue "Creating a new Attendance in ShowEventController"?
Sure.
We have a page where I want to add an instances of attendances, our join table. The function is called on an event page, and the user selects from a dropdown of students. I'm trying to figure out how to define the student ID by the dropdown selection and the event ID by the event page. What I have so far is:
but that's erroring out at
this.student= StudentFactory.query({id: $stateParams.id});
saying that query is expecting an array but getting an object. I'm not sure how to identify the student based on the selection in the dropdown menu.