I am trying to apply this to my site but whenever I access my 'delete' action (I have removed references to 'admin_' in the sample code as I am not using admin_delete yet) I get the error message "The view for XXXController::delete() was not found" (where XXX is my controller). The controller doesn't have a 'delete' function in it as I am using the generic delete function in the app_controller. What am I doing wrong?
Jeremy Burns On 13 Nov 2009, at 15:44, AD7six wrote: > > > On 13 nov, 16:30, jburns <[email protected]> wrote: >> No responses on this - any takers? > > Try this for background: http://www.ad7six.com/e/67 > This (the component is in the mi_plugin branch) for a ~pnp solution, > but probably a bit too integrated/dependent: > http://code.assembla.com/mi/subversion/nodes/branches/mi_plugin/controllers/components/swiss_army.php#ln302 > > or simply: > > function delete($id) { > if (!$this->data) { > $this->set('referer', $this->referer()); // pick this up in the > view, and add it to the form > return $this->render('/elements/confirm_delete'); > } > ... actually delete .. > $this->redirect($this->data[$this->modelAlias]['referer']); // where > they came from > } > > hth, > > AD > > -- > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/cake-php?hl=. > > -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/cake-php?hl=.
