I have my custom routes working fine in 2.x

App::uses('PageSlugRoute', 'Route');

the class in Lib/Route


App::uses('Article', 'Model');
App::uses('CakeRoute', 'Routing/Route');
class ArticleRoute extends CakeRoute {
...
}

in AppModel.php I have

App::uses('Model', 'Model');

class AppModel extends Model {
...
}
 - S




On 21 February 2012 01:18, lowpass <zijn.digi...@gmail.com> wrote:

> I clued in to change it to:
>
> App::uses('PageSlugRoute', 'routes');
>
> But now I get a fatal error when PageSlugRoute imports the Page model:
>
> Fatal error: Class 'Model' not found in
> /var/www/vhosts/jcah/app/Model/AppModel.php on line 3
>
> So it's no longer possible to instantiate a model inside a custom
> route class? Is anyone doing this in 2.x?
>
> --
> 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
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to