webapp/app/views/layers/index.html.erb
<h1>Listing layers for <%= @map.name %></h1>
<table>
<tr>
<th>Name</th>
<th></th>
<th></th>
<th></th>
</tr>
<% @layers.each do |layer| %>
<tr>
<td><%= layer.name %></td>
<td><%= link_to 'Show', [layer.map, layer] %></td>
<td><%= link_to 'Edit', edit_map_layer_path(layer.map, layer) %></td>
<td><%= link_to 'Destroy', [layer.map, layer], :confirm => 'Are you sure?', :method => :delete %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to 'New Layer', new_map_layer_path(@map) %> |
<%= link_to 'Back', map_path(@map) %>