Re: Component and models

2008-05-23 Thread Stinkbug
I've wanted to do the same thing several times, but they keep telling me it's best of you don't access models from components (don't ask me why). One thing they told me in the IRC chat is that most of the time it's best to pass data as a parameter to the component. Any reusable code that needs

Component and models

2008-05-22 Thread laeffe
Hi, I know this has been discussed before, but I just want it to be clarified. From within a component I like to access a Model, what would be the correct approach? App::import(Model, Modelname); $modelname = new Modelname(); maybe? --~--~-~--~~~---~--~~ You

Re: Component and models

2008-05-22 Thread b logica
While you wait for a more authoritive reply, I'll chip in to say that that's what I've done where I needed to. But I think it depends on the model's association with the controller that loads the component. On Thu, May 22, 2008 at 3:55 AM, laeffe [EMAIL PROTECTED] wrote: Hi, I know this has