<?php
/**
 * Descriptions
 * @author yzxh24
 * @email yzxh24@gmail.com
 * @created 2010-06-06 09:10:55
 */
class CreateAction extends BaseAction
{
    public function run()
    {
        //put your code here
        $model = new BookVote();

		// Uncomment the following line if AJAX validation is needed
		// $this->performAjaxValidation($model);

		if(isset($_POST['BookVote']))
		{
			$model->attributes = $_POST['BookVote'];
			if($model->save())
            {
				$this->getController()->redirect(array('view','id' => $model->id));
            }
		}

		$this->getController()->render('create',array(
			'model'=>$model,
		));
    }
}