Skip to content

Commit

Permalink
Making ViewTask always refresh model schema so baked views reflect cu…
Browse files Browse the repository at this point in the history
…rrent schema.
  • Loading branch information
markstory committed Dec 30, 2009
1 parent ec88bd9 commit 31fff5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cake/console/libs/tasks/view.php
Expand Up @@ -283,7 +283,7 @@ function __loadController() {
$displayField = $modelObj->displayField;
$singularVar = Inflector::variable($modelClass);
$singularHumanName = $this->_singularHumanName($modelClass);
$schema = $modelObj->schema();
$schema = $modelObj->schema(true);
$fields = array_keys($schema);
$associations = $this->__associations($modelObj);
} else {
Expand Down Expand Up @@ -469,7 +469,7 @@ function __associations(&$model) {
$associations[$type][$assocKey]['displayField'] = $model->{$assocKey}->displayField;
$associations[$type][$assocKey]['foreignKey'] = $assocData['foreignKey'];
$associations[$type][$assocKey]['controller'] = Inflector::pluralize(Inflector::underscore($assocData['className']));
$associations[$type][$assocKey]['fields'] = array_keys($model->{$assocKey}->schema());
$associations[$type][$assocKey]['fields'] = array_keys($model->{$assocKey}->schema(true));
}
}
return $associations;
Expand Down

0 comments on commit 31fff5e

Please sign in to comment.