Hi. I have a question about deleting a record. I have a Project model and a ProjectMedia model. Project HAS_MANY ProjectMedia.
I have r=project/show&id=1 set up to show all of the project information along with all of the associated media.
If I browse to r=projectMedia/admin… I get the original CRUD view of all projectMedia entries in the database. If I click on "Delete" … it works just fine.
This is the code:
<?php echo CHtml::linkButton('remove',array(
'submit'=>'',
'params'=>array('command'=>'delete','id'=>$model->project_media_id),
'confirm'=>"Remove {$model->type->description}?")); ?>
However… if I go to r=project/show&id=1… and then I try to click on Delete it's not working. I tried changing the command to 'project_media/delete' but that's not working.
Can anyone give me a hand? Much appreciated!