I’m basically using the default out of the box Yii code, but am running into something a bit odd. If you have the following code in actionUpdate() in the controller:
$editorial=$this->loadModel($id);
if(isset($_POST['Editorial']))
{
$editorial->attributes=$_POST['Editorial'];
if($editorial->save())
$this->redirect(array('admin'));
}
.
.
.
and this in the rules() fn in the model:
return array(
array('active, url, cover, title, body', 'required'),
.
.
.
then it works fine.
But if I take "body" out of the required fields, it stops updating body when you save! Weird huh? What am I missing?
Thanks.