json.history_attendances @history_attendances do |attendance| json.(attendance, :id, :name) json.created_at attendance.created_at.strftime("%Y/%m/%d %H:%M") json.normal_count attendance.normal_count json.leave_count attendance.leave_count json.absence_count attendance.absence_count json.edit_auth @user_course_identity < Course::PROFESSOR || attendance.user_id == User.current.id end json.all_history_count @all_history_count