json.data do json.array! @follow_ups do |d| json.id d.id json.created_at d.created_at.to_s json.staff d.staff.user.real_name json.department d.department_id.present? ? Department.find(d.department_id)&.name : '' json.content d.content json.is_latest d.id == @latest.id end end json.code 0 json.count @follow_ups.total_count