Permalink
Browse files

Update ControllerTask.php

Added an output message if no controllers are baked using the all() function.
  • Loading branch information...
pummra committed Jan 8, 2014
1 parent caf350c commit d41bb0b1b3497080f6e4498130711e223ad45e52
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/Cake/Console/Command/Task/ControllerTask.php
@@ -110,6 +110,7 @@ public function all() {
$admin = $this->Project->getPrefix();
}
$controllersCreated = 0;
foreach ($this->__tables as $table) {
$model = $this->_modelName($table);
$controller = $this->_controllerName($model);
@@ -123,8 +124,13 @@ public function all() {
if ($this->bake($controller, $actions) && $unitTestExists) {
$this->bakeTest($controller);
}
$controllersCreated++;
}
}
if ($controllersCreated === 0) {
$this->out(__d('cake_console', 'No Controllers were baked, Models need to exisit before Controllers can be baked.', $admin));

This comment has been minimized.

Show comment
Hide comment
@marciovmartins

marciovmartins Jan 11, 2014

There is a misspelling at the word "exisit". Thanks

@marciovmartins

marciovmartins Jan 11, 2014

There is a misspelling at the word "exisit". Thanks

This comment has been minimized.

Show comment
Hide comment
@pummra

pummra Jan 11, 2014

Contributor

This is fixed in a later commit.

@pummra

pummra Jan 11, 2014

Contributor

This is fixed in a later commit.

}
}
/**

0 comments on commit d41bb0b

Please sign in to comment.