Hello, > I have tried this out to understand the structure behind it but get > > Query: removeFavorite > > So it must be the below line, but what is the issue with this code? > Why is it using the method as a query? > > $success = $this->Product->User->removeFavorite($id); > > > I can't see what is wrong. Anyone an idea? Thanks so much in advance.
You have to have this method inside your User model, I guess you don't. There are no automagic remove methods in Cake (but there are magic findBy... and findAllBy... methods, which might confuse you). As for the AJAX issue, I'd say it's possible. I'd suggest you used JSON as a return of an ajax check, and the do the rest of the view logic, but maybe I miss the point of your problem... Regards, Piotr --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
