And since I am not technically returning anything for these functions it shouldn't matter where the sit. But I guess for best practices I will just place them at the top of each function. Thank you all for your help.
On Apr 15, 9:51 pm, "Dr. Loboto" <[email protected]> wrote: > $this->autoRender = false should be set before return statement, > that's all. > > On Apr 15, 10:09 pm, jsundquist <[email protected]> wrote: > > > Thank you all. $this->autoRender = false; is exactly what I was > > looking for. Does it have to be at the top of the function or can it > > just be anywhere in the function. I currently have it at the bottom > > and I haven't noticed any problems as of yet. So does this mean I can > > possible expect some in the future? > > > On Apr 15, 8:26 am, "[email protected]" > > > <[email protected]> wrote: > > > Well what also works is just calling another action in the controller > > > at the last line ... e.g. $this->index(); etc. ... just make sure that > > > action is defined with a view. > > > Its not listed, but it works (it might also not be the cake way of > > > doing things) > > > > On Apr 15, 12:45 am, "Mark (Germany)" <[email protected]> > > > wrote: > > > > > oh, i just relized that this was your first point here^^ my mistake, > > > > overread that one > > > > > On 15 Apr., 00:44, "Mark (Germany)" <[email protected]> > > > > wrote: > > > > > > you forgot one: > > > > > > $this->redirect() > > > > > > as it always ends with exit() anyway > > > > > > but the proper way without redirect would be: > > > > > > $this->autoRender = false (anywhere inside that method in the > > > > > controller) > > > > > > On 15 Apr., 00:08, Miles J <[email protected]> wrote: > > > > > > > You can either do the following: > > > > > > > - Have the delete action redirect once the logic is finished > > > > > > - Put $this->autoRender = false; at the top of the action > > > > > > - Put an exit() at the end of the action > > > > > > > I personally would do the 1st or 2nd. > > --~--~---------~--~----~------------~-------~--~----~ 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=en -~----------~----~----~----~------~----~------~--~---
