-unless course.nil? or course.new_record? or !course tr id="course-enrollment-#{course.id}" td= course.id td= course.code td= ajax_link_to_delete student_course_enrollment_path(@student, course.enrollments.where(course_id: course.id, student_id: @student.id).first.id)