A very basic question on Rails. I would like to create a Rails application that, besides the “regular” html view, it can generate a set of XML files. I am aware that I can tailor the templating using the “respond_to” command and using ERB with the templates ???.xml.erb. My question is: suppose that the final document consists in several of these XML files (some are template and must be autoedited by the application but some others are “static” and do not need to be changed). In this scenario, which would be the best location in the application folder to put these ancillary files of the templates?
Thanks a lot in advance
Miquel
I hope I’m understanding your question…
If your responses are most static you should continue using the
.xml.erbtemplates, but if you need something more dynamic maybe you could consider builder templates, which have a.builderor.rxmlextension.This is an example of what a builder template might look like: