private static function renderCsv($actionName, $source)
 {
     HttpUtil::sendDownloadHeaders($actionName . '.csv', 'text/csv');
     $rows = $source->getRows();
     if (count($rows) > 0) {
         $keys = array_keys($rows[0]);
         self::pruneKeys($keys);
         echo afOutput::asCsv($keys);
         foreach ($rows as $row) {
             echo afOutput::asCsv(self::extractValues($row, $keys));
         }
     }
     exit;
 }