Exemplo n.º 1
0
 public function actionCreate()
 {
     $book = new Books();
     if (isset($_REQUEST['Books'])) {
         $book->setAttributes($_REQUEST['Books']);
     }
     if (isset($_REQUEST['save']) && $_REQUEST['save']) {
         $book->save();
     }
     $this->render('create', array('book' => $book));
 }