Is there a way to programmatically build the DOM tree in Rails? This
seems a pretty fundamental feature to have …
eg, generating the view for a calendar. There’s a clear pattern of
table/css elements, half-in-step with a bunch of data that’s going to
appear on the calendar.
It would be clean to have two separate loops for these in code, one
for the html stuff, one for the content. – or is there another way to
keep these concerns separate?
or perhaps there is a clever (not ridic) design solution?
It would be clean to have two separate loops for these in code, one
for the html stuff, one for the content. – or is there another way to
keep these concerns separate?
or perhaps there is a clever (not ridic) design solution?
though sometimes a good way is to render a display:none
HTML template in the page, make clones of that, and loop
through replacing dummy text nodes with real data.
I don’t think scriptaculous’ Builder is what I’m after as it’s
JavaScript, but it seems the Rails/Rubyforge Builder is the server-
side equivalent that I’m after.