/** * Displays a particular model. * @param integer $id the ID of the model to be displayed */ public function actionView($id) { $model = $this->loadModel($id); $historyModel = new CardsHistory('search'); $historyModel->unsetAttributes(); if (isset($_GET['CardsHistory'])) { $historyModel->attributes = $_GET['CardsHistory']; } $historyModel->card_id = $model->id; $this->render('view', array('model' => $model, 'historyModel' => $historyModel)); }