Permalink
Browse files

Fixing use of TemplateTask in other Tasks. Updating bake.group.

  • Loading branch information...
1 parent 1c6d0d5 commit 544188197d10eb7949745f5e507e648c4c5f5388 @markstory markstory committed Jul 1, 2009
@@ -287,7 +287,7 @@ function bakeActions($controllerName, $admin = null, $wannaUseSession = true) {
$this->Template->set(compact('admin', 'controllerPath', 'pluralName', 'singularName', 'singularHumanName',
'pluralHumanName', 'modelObj', 'wannaUseSession', 'currentModelName'));
- $actions = $this->Template->generate('objects', 'controller_actions');
+ $actions = $this->Template->generate('actions', 'controller_actions');
return $actions;
}
@@ -308,7 +308,7 @@ function bake($controllerName, $actions = '', $helpers = null, $components = nul
$this->Template->set('plugin', Inflector::camelize($this->plugin));
$this->Template->set(compact('controllerName', 'actions', 'helpers', 'components', 'isScaffold'));
- $contents = $this->Template->generate('objects', 'controller');
+ $contents = $this->Template->generate('classes', 'controller');
$path = $this->path;
if (isset($this->plugin)) {
@@ -220,7 +220,7 @@ function generateFixtureFile($model, $otherVars) {
$this->Template->set('model', $model);
$this->Template->set($vars);
- $content = $this->Template->generate('objects', 'fixture');
+ $content = $this->Template->generate('classes', 'fixture');
$this->out("\nBaking test fixture for $model...");
$this->createFile($path . $filename, $content);
@@ -705,7 +705,7 @@ function bake($name, $associations = array(), $validate = array(), $primaryKey =
$this->Template->set(compact('name', 'useDbConfig', 'associations', 'validate', 'primaryKey', 'useTable'));
$this->Template->set('plugin', Inflector::camelize($this->plugin));
- $out = $this->Template->generate('objects', 'model');
+ $out = $this->Template->generate('classes', 'model');
$path = $this->path;
if (isset($this->plugin)) {
@@ -175,8 +175,8 @@ function _findTemplate($path, $directory, $filename) {
return $templatePath;
}
}
- $this->err(sprintf(__('Could not find template for %s, exiting.'), $filename));
- $this->_stop();
+ $this->err(sprintf(__('Could not find template for %s', true), $filename));
+ return false;
}
}
@@ -154,7 +154,7 @@ function bake($type, $className) {
$this->Template->set('fixtures', $this->_fixtures);
$this->Template->set('plugin', $plugin);
$this->Template->set(compact('className', 'methods', 'type', 'fullClassName', 'mock', 'construction'));
- $out = $this->Template->generate('objects', 'test');
+ $out = $this->Template->generate('classes', 'test');
$filename = $this->testCaseFileName($type, $className);
$made = $this->createFile($filename, $out);
@@ -1,4 +1,4 @@
-<?phpå
+<?php
/**
* Bake Group test file
*

0 comments on commit 5441881

Please sign in to comment.