Smart RoR wrote:
Best way to display HTML file as text or xml where some parts are
I really don’t understand what you’re trying to do there. How is what
you are describing any different than standard ERB templates. They are
static HTML with some dynamic parts.
So we have a Static HTML file and some portions will be dynamically
Again isn’t that what ERB is?
The Idea is to render as text or xml simply.
Both HTML and XML are just text anyway.
If we read this Template HTML file and Dynamically change it, where
should we store this HTML file?
I’d store them in app/views where all the other HTML templates are
stored. With the dynamic parts rendered with ERB.
If we create using XML Builder, would static HTML Part still be needed
to be coded using Ruby? How can I put Static HTML part in XML Builder?
I can see no need for any of this. Just put the static HTML inside a
view template and render the dynamic parts with ERB (or HAML if that’s
what you might prefer).