build/commands/lite/protected/controllers/PostController.php
public function actionUpdate()
	{
		$post=$this->loadPost();
		if(Yii::app()->request->isPostRequest)
		{
			if(isset($_POST['Post']))
				$post->setAttributes($_POST['Post']);
			if($post->save())
				$this->redirect(array('show','id'=>$post->id));
		}
		$this->render('update',array('post'=>$post));
	}
public function actionUpdate()
	{
		$post=$this->loadPost();
		if(Yii::app()->request->isPostRequest)
		{
			if(isset($_POST['Post']))
				$post->setAttributes($_POST['Post']);
			if($post->save())
				$this->redirect(array('show','id'=>$post->id));
		}
		$this->render('update',array('post'=>$post));
	}
public function actionUpdate ( ) { $ post = $ this -> loadPost ( ) ; if ( Yii :: app ( ) -> request -> isPostRequest ) { if ( isset ( $ _POST [ 'Post' ] ) ) $ post -> setAttributes ( $ _POST [ 'Post' ] ) ; if ( $ post -> save ( ) ) $ this -> redirect ( array ( 'show' , 'id' => $ post -> id ) ) ; } $ this -> render ( 'update' , array ( 'post' => $ post ) ) ; }
Updates a particular post.
If update is successful, the browser will be redirected to the 'show' page.
Updates a particular post . If update is successful the browser will be redirected to the show page .