Hi all, I'm trying to build a routine that generates table rows with the appropriate field types (text_area and text_field for now), and filters out the 'created_at' and 'deleted_at'. <% for column in Project.content_columns %> <tr class="ListLine<%= cycle("0","1") %>"> <td><%= column.human_name %>:</td> ## The line below <% if column.string %> <td><%= text_field 'project', column.name %></td> <% elsif column.text %> <td><%= text_area 'project', column.name %></td> <% end %> </tr> Is there a cleaner way then doing and elsif sequence, and what is the attribute name ('type' in this case) of a column. Been messing with column.string but that doesn't work. Thanx n Greetz Gerard. -- "Who cares if it doesn't do anything? It was made with our new Triple-Iso-Bifurcated-Krypton-Gate-MOS process ..." My $Grtz =~ Gerard; ~ :wq!
on 2006-01-22 11:42