>(..)
> I have two controllers: courses and providers defined as:
> class CoursesController extends AppController {
> var $name='Courses';
> var $uses=array('Courses','Providers');
> var $belongsTo = array('Provider' =>
> array('className' => 'Provider',
> 'conditions' => '',
> 'order' => '',
> 'foreignKey' => 'provider_id'
> ));
I guess the $belongsTo is an attribute that belongs
to the model, not to the controller. Please, review
it.
> (..) $this->Course->Provider->generateList());
>
> (..)
> and at the view for the add I have:
> echo $form->create('Course');
Well. As you said you're a newbie and as you're
using the $form helper to create html form
elements, I supposed you're using the CakePHP
version 1.2. If that's the case, in this version the
generateList is now called find('list').
Hope it helps.
--
MARCELO DE F. ANDRADE (aka "eleKtron")
Belem, PA, Amazonia, Brazil
Linux User #221105
--~--~---------~--~----~------------~-------~--~----~
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 cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment