The 2.0 book documentation for "afterFind" is either wrong or it's missing 
information. The example code...

public function afterFind($results, $primary = false) {
    foreach ($results as $key => $val) {
        if (isset($val['Event']['begindate'])) {
            $results[$key]['Event']['begindate'] = 
$this->dateFormatAfterFind($val['Event']['begindate']);
        }
    }
    return $results;}


...does not work and generates and error.

I added this code to my model and changed the 'Event' index to my model 
name 'Post' and when you run you get a repeated "index 'Post' not found".

What requirement is missing from the documentation?

Thanks a lot for your help :-)

Mark

-- 
Like Us on FacekBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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].
Visit this group at http://groups.google.com/group/cake-php?hl=en.


Reply via email to