It would be nice to emulate similar functionality to rails in which you can "respond_with" a collection or an object and the action will detect what Content-Type it should respond with.
On May 12, 8:13 am, Christophe COEVOET <s...@notk.org> wrote: > Le 12/05/2011 14:04, Javier Garcia a crit : > > > On May 12, 1:51 pm, Christophe COEVOET<s...@notk.org> wrote: > > >> the render method is not about creating a response. It is about creating > >> a response *with a content set by a template*. > > Yes, but.. why not implement render() to create responses whose > > *content could be 'anything' (JSON data for example, you know, beyond > > the templates..)* ?? > > > It's just a proposal. I know that it now works in the way you say. > > > Javi > > Because render() implies rendering a template. To create a Response, > just create a response. When using json_encode, you are not rendering > anything in your controller. > > -- > Christophe | Stof -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en