Weirdly my update function works but like I said I checked access rules and my function is allowed so I don’t know why it is not saving. Is there any way I can print out errors on why save just doesn’t actually save?
That “false” disables validation on save.( CActiveRecord::save() ) Check your validation rules to find the one that causes the problem. Egyébként szia!
Sometime it happens when you change model table schema and you don’t want to generate the model again for good reasons … In that case you can use this before calling save() :
foreach($_POST['YourModel'] as $k=>$v){
if($model->hasAttribute($k)){
$model->setAttribute($k, $v);
}
}
$model->save();