<h1>Listing events</h1>


<table>
  <tr>
<% for column in Event.content_columns %>
    <th><%= column.human_name %></th>
<% end %>
  </tr>
  
<% for event in @events %>
  <tr>
  <% for column in Event.content_columns %>
    <td><%=h event[column.name] %></td>
  <% end %>
    <td><%= link_to 'Show', :action => 'show', :id => event.id %></td>
    <td><%= link_to 'Edit', :action => 'edit', :id => event.id %></td>
    <td><%= link_to 'Destroy', :action => 'destroy', :id => event.id %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New event', :action => 'new' %>
