Skip to content

Commit

Permalink
updating model bake tempalte to meet code standards
Browse files Browse the repository at this point in the history
  • Loading branch information
AD7six committed May 9, 2012
1 parent 5b50763 commit 39a53fe
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions lib/Cake/Console/Templates/default/classes/model.ctp
Expand Up @@ -45,12 +45,14 @@ class <?php echo $name ?> extends <?php echo $plugin; ?>AppModel {
*/
public $useDbConfig = '<?php echo $useDbConfig; ?>';

<?php endif;?>
<?php if ($useTable && $useTable !== Inflector::tableize($name)):
$table = "'$useTable'";
echo "/**\n * Use table\n *\n * @var mixed False or table name\n */\n";
echo "\tpublic \$useTable = $table;\n\n";
<?php endif;

if ($useTable && $useTable !== Inflector::tableize($name)):
$table = "'$useTable'";
echo "/**\n * Use table\n *\n * @var mixed False or table name\n */\n";
echo "\tpublic \$useTable = $table;\n\n";
endif;

if ($primaryKey !== 'id'): ?>
/**
* Primary key field
Expand All @@ -60,6 +62,7 @@ if ($primaryKey !== 'id'): ?>
public $primaryKey = '<?php echo $primaryKey; ?>';

<?php endif;

if ($displayField): ?>
/**
* Display field
Expand Down

0 comments on commit 39a53fe

Please sign in to comment.