Select one column out of 2 returned

Hi, I’m new to RoR, so this may be a silly question.

In this code

<% for team in @teams %>

<% for column in Team.content_columns %> <%=h team.send(column.name) %> <% end %> <% end %>

I get back rows with each 2 columns. I only want the data of the first
column, not the second. For one reason or the other (me) I cannot find
the exact way to define the order/number/definition/id of a column.
Something like column[0].name or so does not seem to work. (And I
probably am thinking to un-RoR) Could someone please help me out on
this one? Greatly appriciated.

On Nov 13, 2006, at 4:42 PM, Rudy wrote:

<% end %>

I get back rows with each 2 columns. I only want the data of the first
column, not the second. For one reason or the other (me) I cannot find
the exact way to define the order/number/definition/id of a column.
Something like column[0].name or so does not seem to work. (And I
probably am thinking to un-RoR) Could someone please help me out on
this one? Greatly appriciated.

What this code is doing is displaying the content of each column for
each team (that’s what the ‘for column in Team.content_columns’ does)
what you want is something like:

<% for team in @teams %>

<%=h team.name %> <% end %>

James.


James S. : Web D.
Work : http://jystewart.net
Play : http://james.anthropiccollective.org

Great. Exactly what I needed. Thanks for the response. I’m coming from
years of programming in Realbasic, so this is something of a switch.
But it is great fun. Keep up the good work, everyone. Thanks again.