I would like to be able to produce both HTML and XML-based views as I
Rails application (models and controllers) - meaning creating/tweaking
templates to augment the default (HTML) view templates.
Is there an easy way to do this?
To take this one step further, I would like Rails to differentiate
two types of clients. Assuming I can auto-generate the HTML and XML
want, how do I get Rails to respond in the way appropriate to a
As background, I am trying to build a dynamic, rich client that will
display Rails “results” by interpreting XML output - all the while
the default HTML interface for testing or, perhaps, less capable
To give a concrete example, both the HTML browser and my rich client can
request to add a category to my recipe book. The browser does it using
default view template. My rich client does it using code. I can very
change the code to POST additional parameters (to indicate I want XML in
response) - but how do I embed this parameter in Rails templating
make sure Rails knows to reply with a XML each time I create a new model
Thanks to anyone who can help!