Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updating default bake templates to exclude primary key input for all …

…actions containing 'add'

Fixes #319
  • Loading branch information...
commit f038cb8ffbb80a44278ef7a4007701f8681a1903 1 parent d1066bf
@markstory markstory authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  cake/console/templates/default/views/form.ctp
View
2  cake/console/templates/default/views/form.ctp
@@ -24,7 +24,7 @@
<?php
echo "\t<?php\n";
foreach ($fields as $field) {
- if ($action == 'add' && $field == $primaryKey) {
+ if (substr($action, 'add') !== false && $field == $primaryKey) {
continue;
} elseif (!in_array($field, array('created', 'modified', 'updated'))) {
echo "\t\techo \$this->Form->input('{$field}');\n";
Please sign in to comment.
Something went wrong with that request. Please try again.