<%- if @course.errors.any? %> $('#new-course-class-group-form-errors').html('<%= render_js_partial("gaku/shared/errors", {target: @course}) %>'); <%- else %> $("#new-course-class-group-form-errors").html(""); <% @not_added_students.each {|enrollment| %> $('#course-students-index tbody').append('<%= render_js_partial("gaku/courses/enrollments/enrolled", {enrollment: enrollment}) %>'); <% } %> $('#new-course-class-group-link').show(); $('#new-course-class-group').slide(); $('#new-course-enrollment-tab-link').html('<%= print_count(@course.students.count, t_student_plural) %>'); $('.course-students-count').html('<%= print_count(@course.students.count, t_student_list) %>'); <% end %> showNotice("<%= render_flash %>");