Skip to content

Commit

Permalink
Using the number helper in baked index pages
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Sep 13, 2014
1 parent a93a0c2 commit 21c9c7a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Template/Bake/default/views/index.ctp
Expand Up @@ -64,7 +64,11 @@ $fields = collection($fields)
}
}
if ($isKey !== true) {
echo "\t\t\t<td><?= h(\${$singularVar}->{$field}) ?>&nbsp;</td>\n";
if (!in_array($schema->columnType($field), ['integer', 'biginteger', 'decimal', 'float'])) {
echo "\t\t\t<td><?= h(\${$singularVar}->{$field}) ?></td>\n";
} else {
echo "\t\t\t<td><?= \$this->Number->format(\${$singularVar}->{$field}) ?></td>\n";
}
}
}

Expand Down

0 comments on commit 21c9c7a

Please sign in to comment.