# ActionView table renderer

**URL:** <https://www.ruby-forum.com/t/actionview-table-renderer/108844>\
**Category:** Rails\
**Created:** [July 8, 2007, 1:17am UTC](https://www.ruby-forum.com/t/actionview-table-renderer/108844 "2007-07-08T01:17:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cow](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ce73a5/32.png) [@Cow](https://www.ruby-forum.com/u/Cow)\
**Post date:** [July 8, 2007, 1:17am UTC](https://www.ruby-forum.com/t/actionview-table-renderer/108844/1 "2007-07-08T01:17:43Z")

</div>

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?
