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.
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:
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.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.