diff --git a/lib/Cake/Console/Command/Task/ModelTask.php b/lib/Cake/Console/Command/Task/ModelTask.php index 70f6dff99..9aa5df18a 100644 --- a/lib/Cake/Console/Command/Task/ModelTask.php +++ b/lib/Cake/Console/Command/Task/ModelTask.php @@ -30,12 +30,12 @@ App::uses('Validation', 'Utility'); class ModelTask extends BakeTask { /** - * path to MODELS directory + * path to Model directory * * @var string * @access public */ - public $path = MODELS; + public $path = null; /** * tasks @@ -69,6 +69,14 @@ class ModelTask extends BakeTask { */ protected $_validations = array(); +/** + * Override initialize + * + */ + public function initialize() { + $this->path = App::path('Model'); + } + /** * Execution method always used for tasks * diff --git a/lib/Cake/bootstrap.php b/lib/Cake/bootstrap.php index 5df50e5aa..b8fd392d3 100644 --- a/lib/Cake/bootstrap.php +++ b/lib/Cake/bootstrap.php @@ -48,11 +48,6 @@ if (!defined('APP')) { define('APP', ROOT.DS.APP_DIR.DS); } -/** - * Path to the application's models directory. - */ - define('MODELS', APP.'Model'.DS); - /** * Path to model behaviors directory. */