Complete Lesson 10
This commit is contained in:
parent
f95f15ae81
commit
144b2ca04f
@ -5,4 +5,7 @@ class MoviesController < ApplicationController
|
|||||||
@movies.append(@choices.sample())
|
@movies.append(@choices.sample())
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
def show
|
||||||
|
@movie = Movie.find(params[:id])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
17
app/views/movies/show.html.erb
Normal file
17
app/views/movies/show.html.erb
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<section class="movie-details">
|
||||||
|
<div class="details">
|
||||||
|
<h1><%= @movie.title %></h1>
|
||||||
|
<h2>
|
||||||
|
<%= year_of(@movie) %> • <%= @movie.rating %>
|
||||||
|
</h2>
|
||||||
|
<p>
|
||||||
|
<%= @movie.description %>
|
||||||
|
</p>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>Total Gross:</th>
|
||||||
|
<td><%= total_gross(@movie) %></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
Loading…
x
Reference in New Issue
Block a user