Complete Lesson 10

main
Simon Quigley 1 year ago
parent f95f15ae81
commit 144b2ca04f

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

@ -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>
Loading…
Cancel
Save