<?php $this->description();?>

class CreateAction extends <?php echo $this->extendsActionClass;?>

{
    public function run()
    {
        //put your code here
        $model = new <?php echo $this->modelClass;?>();

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

		if(isset($_POST['<?php echo $this->modelClass; ?>']))
		{
			$model->attributes = $_POST['<?php echo $this->modelClass; ?>'];
			if($model->save())
            {
				$this->getController()->redirect(array('view','id' => $model-><?php echo $this->tableSchema->primaryKey; ?>));
            }
		}

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