Populating an array from a model with column names

I was trying to be clever, by taking some view code and stuff it into
controller code.

This is what I came up with to get an array of column names, but it
doesn't work the way I expect it to. The view-source shows a bunch of
empty TD's , so I know it's looping through, but with no data.

Listing is a model/class

controller:
@column_names = Listing.content_columns.each {|x| x.human_name}

view:
<% @column_names.each do |t| %>
<td> <% t %> </td>
<%end%>

Any thoughts on making the column_names variable non blank?

Thanks

Matt

matt wrote:

@column_names = Listing.content_columns.each {|x| x.human_name}

Try...

@column_names = Listing.content_columns.collect {|x| x.human_name}

matt wrote:

view:
<% @column_names.each do |t| %>
<td> <% t %> </td>
<%end%>

And also...

<td> <%= t %> </td>

That didn't work either... I even restarted Webrick...

hehe... I love being the idiot.

Thanks for the eyes.

Matt