<h1>Listing languages</h1>

<table>
  <tr>
  <% for column in Language.content_columns %>
    <th><%= column.human_name %></th>
  <% end %>
  </tr>
  
<% for language in @languages %>
  <tr>
  <% for column in Language.content_columns %>
    <td><%=h language.send(column.name) %></td>
  <% end %>
    <td><%= link_to 'Show', :action => 'show', :id => language %></td>
    <td><%= link_to 'Edit', :action => 'edit', :id => language %></td>
    <td><%= link_to 'Destroy', { :action => 'destroy', :id => language }, :confirm => 'Are you sure?', :method => :post %></td>
  </tr>
<% end %>
</table>

<%= link_to 'Previous page', { :page => @language.previous_page } if @language.previous_page %>
<%= link_to 'Next page', { :page => @language.next_page } if @language.next_page %> 

<br />

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