On Thu, Mar 24, 2011 at 7:21 PM, euromark <[email protected]> wrote:
> because you just importet the class..
>
> use
>
> $this->Season = ClassRegistry::init('Season')
>
> or loadModel('Season')

Oops! Yes, my bad. I meant the first choice. App::import() is not a
good choice here.

if ((is_null($id)) || (!is_numeric($id)))
{
        $this->Session->write(
                'editable_season_id',
                ClassRegistry::init('Season')->getLastSeasonId()
        );
}

Sorry about that.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to