[Seaside] Rendering page as XML or JSON?
Conrad Taylor
conradwt at gmail.com
Thu Apr 17 19:33:07 UTC 2008
Hi, is there an easy to render a page as XML/JSON instead of HTML? For
example, I would like to send back the collection as XML document. Thus,
I'm looking for something similar to Rails respond_to whereas
def show
@order = Order.find(params[:id])
respond_to do |format| format.html # show.rhtml format.xml { render :xml =>
@order.to_xml }
format.js { render :json => @order.to_json }
end
end
Thanks in advance,
-Conrad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20080417/b83c5fcb/attachment.htm
More information about the seaside
mailing list