From 96afc71d7af7afc79dc98e45e0c738575225035d Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Mon, 25 Sep 2023 14:08:52 -0500 Subject: [PATCH] Complete Lesson 8 --- app/controllers/movies_controller.rb | 2 +- app/views/layouts/application.html.erb | 17 +++++++++++++++-- app/views/movies/index.html.erb | 3 --- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/app/controllers/movies_controller.rb b/app/controllers/movies_controller.rb index 3b969b4..8f2b634 100644 --- a/app/controllers/movies_controller.rb +++ b/app/controllers/movies_controller.rb @@ -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 diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 5421bc4..9ac861f 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,7 +1,7 @@ - Bootcamp + Movie Selections <%= csrf_meta_tags %> <%= csp_meta_tag %> @@ -12,6 +12,19 @@ - <%= yield %> +
+ +
+
+ <%= yield %> +
+ diff --git a/app/views/movies/index.html.erb b/app/views/movies/index.html.erb index aec270a..9e7f19c 100644 --- a/app/views/movies/index.html.erb +++ b/app/views/movies/index.html.erb @@ -1,7 +1,4 @@
-