Permalink
Browse files

skipTables

  • Loading branch information...
1 parent 1668067 commit 107db8b8339ebb27c6b87beed3347793481a4ec3 @petteyg committed Dec 2, 2011
Showing with 10 additions and 0 deletions.
  1. +10 −0 lib/Cake/Console/Command/Task/ControllerTask.php
@@ -42,6 +42,13 @@ class ControllerTask extends BakeTask {
public $path = null;
/**
+ * Tables to skip when running all()
+ *
+ * @var array
+ */
+ public $skipTables = array('i18n');
+
+/**
* Override initialize
*
* @return void
@@ -106,6 +113,9 @@ public function all() {
ClassRegistry::config('Model', array('ds' => $this->connection));
$unitTestExists = $this->_checkUnitTest();
foreach ($this->__tables as $table) {
+ if (in_array($table, $this->skipTables)) {
+ continue;
+ }
$model = $this->_modelName($table);
$controller = $this->_controllerName($model);
App::uses($model, 'Model');

0 comments on commit 107db8b

Please sign in to comment.