Forum: Ruby on Rails ActionView table renderer

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
0c333ada027fc94d22fca5596e87171c?d=identicon&s=25 Cow (Guest)
on 2007-07-08 01:17
(Received via mailing list)
Hi all,

I've always been a big fan of writing clean (DRY) code and so I
figured that with ruby and rails I'm in the right place. Having some
fun with rails for a few months there's one thing that starts to annoy
me. I write mostly data driven applications which consists for a large
part of forms and master/detail views. Although writing a form with a
few lines of code isn't a problem using a form builder everyone seems
to make table views by writing the html code for each table over and
over again.

With the idea of a table renderer (like in myfaces trinidad of prado)
in the back of my head I went on searching for someone who've already
made such a thing but except for a few very basic projects I've found
non. So I'm thinking of writing something my own but I'm having a very
basic problem.

How to call the table render from the rhtml template using a nicely
looking construct? The basic model consists of:
-Table which has an array of objects to render and a few parameters
-Columns which have a method name to call on the row object,
parameters and an optional code block to render in the table cell.

Does anybody have an idea on how such a construct should look like or
know a plugin that's ready to use?
This topic is locked and can not be replied to.