You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
696 B

<div class="container">
<ul>
<% @movies.each do |movie| %>
<section class="movie">
<div class="image">
<%= image_tag movie.image_file_name %>
</div>
<div class="summary">
<h2>
<%= link_to(movie.title, movie_path(movie)) %>
</h2>
<h3>
<%= total_gross(movie) %>
</h3>
<span class="stars">
<%= average_stars(movie) %>
</span>
<p>
<%= truncate(movie.description, length: 150, separator: ' ') %>
</p>
</div>
</section>
<% end %>
</ul>
<section class="admin">
<%= link_to "Add New Movie", new_movie_path, class: "button" %>
</section>
</div>