On Aug 20, 6:14 pm, "Jon Bennett" <[EMAIL PROTECTED]> wrote:
> there's no 'magic' method called 'unpaid', there's only:

Yes, I know. :)

I overrode the find() method in my Purchase model similar to what Nate
Abele suggests in http://c7y.phparch.com/c/entry/1/art,mvc_and_cake

public function find($type, $options = array()) {
    switch ($type) {
      case "popular":
        return parent::find('all', array_merge(
          array(
            'limit' => 10,
            'order' => 'Post.view_count DESC'
          ),
          $options
        );
      default:
        return parent::find($type, $options);
    }
}

However, I think the Containable Behavior is what I need.

Thank you both for your help!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to