Or you can pass the Session component to your model function as parameter, so that you can access this component from there,
In your Controller, $this->YourModelName->yourModelFunction($this->session) And in your Model function function yourModelFunction($session) { $session->setFlash('blah blah blah...'); } But better you use the component from your Controller. On Jan 6, 2008 4:51 PM, AD7six <[EMAIL PROTECTED]> wrote: > > > > On Jan 5, 6:21 pm, MikeK <[EMAIL PROTECTED]> wrote: > > I moved some code from a controller to the model, and the code set > > some flash error msgs using the session component setFlash call. > > > > I didn't realize it wasn't working until someone triggered the error > > today -- is there any way to make that work or do I need to > > restructure the interface to the routine? > > You cannot use the session component from a model - return a value > that your controller uses to act on. > > hth, > > AD > > > > -- Thanks Anupom Trippert Inc. [http://www.trippert.com] GopherNow. [http://www.gophernow.com/] Homepage. [http://www.anupom.wordpress.com/] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---