<%= @movie.title %>
<%= year_of(@movie) %> • <%= @movie.rating %>
<%= average_stars(@movie) %>
<%= link_to pluralize(@movie.reviews.size, "review"), movie_reviews_path(@movie) %>
<%= @movie.description %>
Director: |
<%= @movie.director %> |
Duration: |
<%= @movie.duration %> |
Total Gross: |
<%= total_gross(@movie) %> |
<%= link_to "Write Review", new_movie_review_path(@movie), class: "review" %>
<% if current_user_admin? %>
<%= link_to "Edit", edit_movie_path(@movie), class: "button" %>
<%= link_to "Delete", movie_path(@movie), class: "button", data: { turbo_method: :delete, turbo_confirm: "Are you sure?" } %>
<% end %>