<h1>Listing actors / actresses</h1>

<table>
  <tr>
    <th>Last name</th>
    <th>First name</th>
    <th>Year of birth</th>
    <th>Nationality</th>
    <th>Height</th>
    <th>Gender</th>
    <th>Bio</th>
    <th># of movies</th>
  </tr>

<% @actors.each do |actor| %>
  <tr>
    <td><%=h actor.last_name %></td>
    <td><%=h actor.first_name %></td>
    <td><%=h actor.year_of_birth %></td>
    <td><%=h actor.nationality %></td>
    <td><%=h actor.height %></td>
    <td><%=h actor.gender %></td>
    <td><%=h actor.bio %></td>
    <td><%=h actor.movies.count %>
    <td><%= link_to 'Show', actor %></td>
    <td><%= link_to 'Edit', edit_actor_path(actor) %></td>
    <td><%= link_to 'Destroy', actor, 
    :confirm => 'Are you sure you want to delete actor and all their photos?', 
    :method => :delete %></td>
  </tr>
<% end %>
</table>
<%= image_tag 'actor_sample.png' unless @actors.any? %>
<br />

<%= link_to 'New actor', new_actor_path %>