To avoid having to define a scenario to all rules, i suggest that Yii ignores generic rules and takes those with a scenario if the corresponding scenario is found.
example:
public function rules() {
return array(
array('name','file','allowEmpty'=>false),
array('name','required','on'=>'update'),
);
}
In that case, even if i use:
$this->model->setScenario('update');
I’ll get a validation error:
[color="#FF0000"]Name cannot be blank.[/color]
To avoid this i have to define a new scenario like this:
public function rules() {
return array(
array('name','file','on'=>'save','allowEmpty'=>false),
array('name','required','on'=>'update'),
);
}