Complete Lesson 10

This commit is contained in:
Simon Quigley 2023-09-25 15:00:10 -05:00
parent f95f15ae81
commit 144b2ca04f
2 changed files with 20 additions and 0 deletions

View File

@ -5,4 +5,7 @@ class MoviesController < ApplicationController
@movies.append(@choices.sample())
}
end
def show
@movie = Movie.find(params[:id])
end
end

View File

@ -0,0 +1,17 @@
<section class="movie-details">
<div class="details">
<h1><%= @movie.title %></h1>
<h2>
<%= year_of(@movie) %> &bull; <%= @movie.rating %>
</h2>
<p>
<%= @movie.description %>
</p>
<table>
<tr>
<th>Total Gross:</th>
<td><%= total_gross(@movie) %></td>
</tr>
</table>
</div>
</section>