REST APIs routing issue
My "Notes" controller looks like this- http://pastebin.com/ReppRt4t And routes.php as- CakePlugin::routes(); Router::parseExtensions('json'); Router::mapResources('notes'); Router::parseExtensions(); require CAKE . 'Config' . DS . 'routes.php'; When I make GET call to http://hostname/notes.json I am able to see results as expected. Sample result- http://pastebin.com/pYY3H2Ja But when I make GET call as http:// hostname /notes/1234.json I get error- {"code":"404","url":"\/notes\/1234.json","name":"Action NotesController:: 1234() could not be found."} Why is that index function is working as expected but not view function? I suspect something is wrong with routing. What could be wrong? Thanks, GK -- 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
Getting all the acos a aro can access?
Hi there I'm trying to work out how to get all the access control objects an access request object can access - for example all the blog posts a user can edit. Can anybody point me in the right direction on how to do this? Thanks very much. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~--~~~~--~~--~--~---
Re: Use Multiple Two Database's Tables In Single Controller...
Hi, http://groups.google.com/group/cake-php/browse_thread/thread/eacfade1d52c9071/f5e3c395037043b3 read above URL. Thanks. On Oct 31, 3:35 pm, Daivat <[EMAIL PROTECTED]> wrote: > Hi, > > I have one major problem for that i am not getting the proper > solution. > > I need to use two different tables in a single controller, but both > tables are from two different databases. > > my database.php is as below: > > class DATABASE_CONFIG > { > var $default = array('driver' => 'mysql', > 'connect' => > 'mysql_connect', > 'host' => > 'localhost', > 'login' => > 'root', > 'password' => > '**', > 'database' => > 'database1', > 'prefix' => > ''); > > var $test = array('driver' => 'mysql', > 'connect' => > 'mysql_connect', > 'host' => > 'localhost', > 'login' => > 'root', > 'password' => > '**', > 'database' => > 'database2', > 'prefix' => > '');} > > ?> > > my model class contains code like below: > > class ModelName2 extends AppModel { > var $name = 'ModelName2'; > var $useDbConfig = 'test'; > //var $useTable = 'model_names';} > > ?> > > controller contains: > > class MyController extends AppController { > var $name = 'My'; > var $uses = array('ModelName1','ModelName2'); >... >... >... >... > > } > > But such code give me error like below: > Fatal error: Cannot redeclare class dbosource in /www/ > */cake/libs/model/datasources/dbo_source.php on line > 1716 > > Please help me to fix this problem --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---