I'm using TbExtendedGridView from Yii Booster. My 'status' column is defined as TbToggleColumn.
array(
'name'=>'status',
'class'=>'bootstrap.widgets.TbToggleColumn',
'toggleAction' => 'Artykul/toggle'
),
In my model I have a validation rule that prevents changing the value of 'status' unless some conditions are met. The validation works fine in create / update scenarios BUT it doesn't work - i.e. the condition is not checked - if I click to toggle 'status' in the gridview.
Any idea about how to force TbToggleColumn to use the validation rules defined in the model?
--- edit -
I have now changed in TbToggleAction shipped with Yii Booster:
$success = $model->save(false, array($attribute));
to
$success = $model->save(true, array($attribute));