hi there.
first post here but have been using cake for a few months now...
i am trying to figure out he best practice here.
Suppose I have a model (call is 'story' that will be used in possibly
a few pages or in a few other models). I want to have a rating system
for any article that will work in an ajax way. i.e.:
/artictle/rate/12234/<RATING>
in the controller i would want someting like
function rate() {
// bla bla bla....
$this->set('rating',$rating);
}
and I would like to be able to use this function in multiple pages.
What is the best design practice for such a method. Do I want it in a
component or in a controller? From all the examples (ajax on the web)
it seems like the
in your controller method you need to specify the page you are going
to render on? I want universal usage and re-use.
Any pointers would be great.
Thanks
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---