Re: HABTM and field formatting issue [Need Suggestion]

2009-01-13 Thread Ernesto
strtoupper was just an example. anyway... imho even a simple format like this should be handled by the model On 12 Gen, 21:56, Miles J mileswjohn...@gmail.com wrote: Minor things like that could also be done in the view :p --~--~-~--~~~---~--~~ You received

Re: HABTM and field formatting issue [Need Suggestion]

2009-01-12 Thread Ernesto
thx! missed that thread. On 9 Gen, 17:10, grigri j...@hendersonwebdesign.com wrote: The format of the `$results` array in `afterFind` varies, a lot, depending on circumstance. Your best bet is to do a debug($results) inside `afterFind` to see exactly what structure the data is in and act

Re: HABTM and field formatting issue [Need Suggestion]

2009-01-12 Thread Ernesto
ok. i copied the function found in linked thread and made all format functions works on flat arrays ($field = $value). Format is working like a charm. Thx a lot On 12 Gen, 09:14, Ernesto e.fanz...@gmail.com wrote: thx! missed that thread. On 9 Gen, 17:10, grigri

Re: HABTM and field formatting issue [Need Suggestion]

2009-01-12 Thread Miles J
Minor things like that could also be done in the view :p --~--~-~--~~~---~--~~ 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,

HABTM and field formatting issue [Need Suggestion]

2009-01-09 Thread Ernesto
Hello. i have 2 models, linked together by a HABTM relationship. The 2nd model has a function that formats some fields after the data is loaded. Why is this function not working if i load data from the HABTM relationship? is there any better way to make this work? Here's an example NOTE: this

Re: HABTM and field formatting issue [Need Suggestion]

2009-01-09 Thread grigri
The format of the `$results` array in `afterFind` varies, a lot, depending on circumstance. Your best bet is to do a debug($results) inside `afterFind` to see exactly what structure the data is in and act accordingly. There was another thread on this recently. Your `afterFind` code must cope