Skip to content

Instantly share code, notes, and snippets.

@damuz91
Created February 1, 2018 13:50
Show Gist options
  • Save damuz91/693a16ab14bf692488556cc07ed51243 to your computer and use it in GitHub Desktop.
Save damuz91/693a16ab14bf692488556cc07ed51243 to your computer and use it in GitHub Desktop.
data = [{nombre: 'Juan', color: 'azul', edad: '50' }, {nombre: 'Carlos', color: 'verde', edad: '20' } ]
<table>
<thead>
<tr>
<th>Nombre</th>
<th>Color</th>
<th>Edad</th>
</tr>
</thead>
<tbody>
<% data.each do |persona| %>
<tr>
<td><%= persona[:nombre] %></td>
<td><%= persona[:color] %></td>
<td><%= persona[:edad] %></td>
</tr>
<% end -%>
</tbody>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment