From 2b2c22eee472484ad8989d1a5215f3592efff3d5 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Tue, 15 Oct 2013 20:31:43 -0400 Subject: [PATCH] Fixes #980: Changed the default way of generating action URLs for ActionColumn. --- framework/yii/grid/ActionColumn.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/framework/yii/grid/ActionColumn.php b/framework/yii/grid/ActionColumn.php index 72fafb6..6a4ed9f 100644 --- a/framework/yii/grid/ActionColumn.php +++ b/framework/yii/grid/ActionColumn.php @@ -72,12 +72,11 @@ class ActionColumn extends Column if ($this->urlCreator instanceof Closure) { return call_user_func($this->urlCreator, $model, $action); } else { - $route = Inflector::camel2id(StringHelper::basename(get_class($model))) . '/' . $action; $params = $model->getPrimaryKey(true); if (count($params) === 1) { $params = array('id' => reset($params)); } - return Yii::$app->getUrlManager()->createUrl($route, $params); + return Yii::$app->controller->createUrl($action, $params); } }