<table>
  <tr>
    <th>Title</th>
    <th>Year Released</th>
    <th>Language</th>
    <th>Rating</th>
    <th>Length</th>
    <th>black and white</th>
    <th>Star rating</th>
    <th>Genre</th>
    <th>Synopsis</th>
    <th># of actors</th>
    <th># of Reviews</th>
  </tr>

<% @movies.each do |movie| %>
  <tr>
    <td><%=h movie.title %></td>
    <td><%=h movie.year_released %></td>
    <td><%=h movie.language %></td>
    <td><%=h movie.rating %></td>
    <td><%=h movie.length %></td>
    <td><%=h movie.bw %></td>
    <td><%=h movie.star_rating %></td>
    <% if movie.genre %>
       <td><%=h movie.genre.genre_name %></td>
    <% else %>
       <td><%=h "Unassigned" %></td>
    <% end %>
    <td><%=h movie.synopsis %></td>
    <td><%=h movie.actors.count %></td>
    <td><%=h movie.reviews.count %></td>
    <td><%= link_to 'Show', movie %></td>
    <td><%= link_to 'Edit', edit_movie_path(movie) %></td>
    <td><%= link_to 'Reviews', movie_reviews_path(movie) %>
    <td><%= link_to 'Destroy', movie, 
    :confirm => 'Are you sure (movie and potentially all its reviews) ?', 
    :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />