On Fri, Jun 20, 2008 at 10:33 PM, Turnquist, Jonah <[EMAIL PROTECTED]> wrote:
>
> Eh, it did not work. And I read those pages, it does not seem to tell
> me. Do I need to do this manually using find() to find all the
> categories and than pass those to the input through 'options' or will
> cake do some magic because of my $belongsTo definition? Also, if I do
> it manually, how would I call the Categories modal from the Scripts
> controller? This obviously did not work in my Scripts controller:
> $this->Category->find('all', array('recursive' => -1));
It looks to me like you're trying to generate a list of things for
your form. If so, try this from your scripts controller:
$this->Entry->Category->recursive = -1;
$results = $this->Entry->Category->find('list');
Make sure that you've set the $uses variable in your Scripts
controller to tell it you want to use Entry.
class ScriptsController extends AppController {
var $uses = array('Entry', ...)
...
}
Hope that helps.
--
Chris Hartjes
Internet Loudmouth
Motto for 2008: "Moving from herding elephants to handling snakes..."
@TheKeyBoard: http://www.littlehart.net/atthekeyboard
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---