Complete Lesson 8

main
Simon Quigley 1 year ago
parent eb029fb99b
commit 96afc71d7a

@ -1,7 +1,7 @@
class MoviesController < ApplicationController
def index
@choices, @movies = Movie.all, []
(0..15).each{ |num|
(0..10).each{ |num|
@movies.append(@choices.sample())
}
end

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>Bootcamp</title>
<title>Movie Selections</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
@ -12,6 +12,19 @@
</head>
<body>
<header>
<div class="alert alert-primary" role="alert">
<h1>The only movies that actually matter</h1>
</div>
</header>
<div class="content">
<%= yield %>
</div>
<footer>
<p>
Copyright © <%= Time.now.year %>
<%= link_to "Skyleaf Design", "https://skyleafdesign.com/" %>
</p>
</footer>
</body>
</html>

@ -1,7 +1,4 @@
<div class="container">
<div class="alert alert-primary" role="alert">
<h1>The only movies that actually matter</h1>
</div>
<ul>
<% @movies.each do |movie| %>

Loading…
Cancel
Save