Skip to content

Commit

Permalink
Fix View task missing 'app' param when baking custom action.
Browse files Browse the repository at this point in the history
  • Loading branch information
majna committed Nov 5, 2011
1 parent cd81f9c commit 3374406
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Console/Command/Task/ViewTask.php
Expand Up @@ -327,7 +327,7 @@ public function customAction() {
$this->hr();
$this->out(__d('cake_console', 'Controller Name: %s', $this->controllerName));
$this->out(__d('cake_console', 'Action Name: %s', $action));
$this->out(__d('cake_console', 'Path: %s', $this->params['app'] . DS . 'View' . DS . $this->controllerName . DS . Inflector::underscore($action) . ".ctp"));
$this->out(__d('cake_console', 'Path: %s', $this->getPath() . $this->controllerName . DS . Inflector::underscore($action) . ".ctp"));
$this->hr();
$looksGood = $this->in(__d('cake_console', 'Look okay?'), array('y','n'), 'y');
if (strtolower($looksGood) == 'y') {
Expand Down
1 change: 0 additions & 1 deletion lib/Cake/Test/Case/Console/Command/Task/ViewTaskTest.php
Expand Up @@ -431,7 +431,6 @@ public function testBakeActions() {
*/
public function testCustomAction() {
$this->Task->controllerName = 'ViewTaskComments';
$this->Task->params['app'] = APP;

$this->Task->expects($this->any())->method('in')
->will($this->onConsecutiveCalls('', 'my_action', 'y'));
Expand Down

0 comments on commit 3374406

Please sign in to comment.