On Feb 8, 10:47 am, Alfredo Quiroga-Villamil <[email protected]> wrote: > Rails has a respond_to method that allows you to completely bypass the > view and render from within the controller. This is quite helpful for > instances where you are doing lots of ajax. Currently my application > is 100 % ajax/javascript in the front end. I usually get the data that > I want, set the variables for the views and render from there. It > would be nice however to render right from my controller since I > already have everything I want there and my view is nothing but an > echo of json. Is there a respond_to equivalent or a similar approach?
You could try doing '$this->autoRender = false;' and then just echoing your data. If you want/need to bypass the layout as well, do a similar thing but change the property to 'autoLayout'. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
