Hi again, I have a problem attempting to execute a ERB snippet saved
in an array.
In the controller I have an array like this one:
@my_objects=[ [‘Name Object 1’,’<%=another_array_iterator.name%>’],
[‘Name Object 1’,’<%=another_array_iterator.description%>’], [‘Name
Object 1’,’<%=another_array_iterator.value%>’] ]
And in the view I like to do something like this:
<thead>
<tr>
<% for t in @my_objects%>
<th><%=t[0]%></th>
<% end %>
</tr>
</thead>
<tbody>
<tr>
<% for t in @my_objects%>
<th><%=t[1]%></th>
<% end %>
</tr>
</tbody>
And of course that this doesn’t work because rather than execute the
ERB snippet in the array is just putting it.
How can I execute an ERB snippet saved in an array rather than just
printing it?
Thanks!!!