Skip to content
Permalink
Browse files

Fix links for associated records.

Fixes #3941
  • Loading branch information...
markstory committed Jul 11, 2014
1 parent 247e131 commit a414484500075d284889441625559574f1864799
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Console/Templates/default/views/index.ctp
@@ -32,7 +32,7 @@ use Cake\Utility\Inflector;
foreach ($associations['BelongsTo'] as $alias => $details) {
if ($field === $details['foreignKey']) {
$isKey = true;
echo "\t\t<td>\n\t\t\t<?= \$this->Html->link(\${$singularVar}->{$details['property']}->{$details['displayField']}, ['controller' => '{$details['controller']}', 'action' => 'view', \${$singularVar}->{$details['primaryKey'][0]}]); ?>\n\t\t</td>\n";
echo "\t\t<td>\n\t\t\t<?= \$this->Html->link(\${$singularVar}->{$details['property']}->{$details['displayField']}, ['controller' => '{$details['controller']}', 'action' => 'view', \${$singularVar}->{$details['property']}->{$details['primaryKey'][0]}]); ?>\n\t\t</td>\n";
break;
}
}

0 comments on commit a414484

Please sign in to comment.
You can’t perform that action at this time.