I'd do it in the query...as a virtual field - you should be able to get away with it as a pure expression. Probably much faster than getting everything then looping through the results.
If you did end up having to do it programatically, a behavior might be the right place if you wish to reuse the functionality later. note my formula isn't perfect. Mess around with it in a spreadsheet with a graph so you can see how the rating will behave. You'll probably need to do considerable tuning to get it doing exactly what you want and it may be open to abuse by your users. On Fri, Jul 6, 2012 at 12:31 PM, 42startups <he...@42startups.com> wrote: > Cool thanks, I'll give that a go. Should I put that in the beforeRender() > function? > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Check out the new CakePHP Questions site http://ask.cakephp.org and help > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group > at http://groups.google.com/group/cake-php > -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php