Commit 71a619d2 by Carsten Brandt

Merge pull request #1200 from zhuravljov/master

Fixed gii after merge #1184
parents 6fd0f0da c5ee83bf
...@@ -278,7 +278,7 @@ class Generator extends \yii\gii\Generator ...@@ -278,7 +278,7 @@ class Generator extends \yii\gii\Generator
$rules = []; $rules = [];
foreach ($types as $type => $columns) { foreach ($types as $type => $columns) {
$rules[] = "['" . implode(', ', $columns) . "', '$type']"; $rules[] = "[['" . implode("', '", $columns) . "'], '$type']";
} }
return $rules; return $rules;
......
...@@ -237,10 +237,10 @@ class Generator extends \yii\gii\Generator ...@@ -237,10 +237,10 @@ class Generator extends \yii\gii\Generator
$rules = []; $rules = [];
foreach ($types as $type => $columns) { foreach ($types as $type => $columns) {
$rules[] = "[['" . implode(', ', $columns) . "'], '$type']"; $rules[] = "[['" . implode("', '", $columns) . "'], '$type']";
} }
foreach ($lengths as $length => $columns) { foreach ($lengths as $length => $columns) {
$rules[] = "[['" . implode(', ', $columns) . "'], 'string', 'max' => $length]"; $rules[] = "[['" . implode("', '", $columns) . "'], 'string', 'max' => $length]";
} }
return $rules; return $rules;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment