From 279b274e5ad87f686b0b705f091e0802eb924f0f Mon Sep 17 00:00:00 2001
From: Alexander Makarov <sam@rmcreative.ru>
Date: Thu, 4 Jul 2013 03:22:47 +0400
Subject: [PATCH] fixed controller example

---
 docs/guide/controller.md | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/docs/guide/controller.md b/docs/guide/controller.md
index 60ba680..c550b42 100644
--- a/docs/guide/controller.md
+++ b/docs/guide/controller.md
@@ -119,9 +119,8 @@ class BlogController extends Controller
 			throw new HttpException(404);
 		}
 
-		$data = \Yii::$app->request->getPost('Post');
-		if($data) {
-			$post->populate($data);
+		if(\Yii::$app->request->isPost)) {
+			$post->load($_POST);
 			if($post->save()) {
 				$this->redirect(array('view', 'id' => $post->id));
 			}
--
libgit2 0.27.1