From 020e9b08f9c462c5b5a8c8de045ad82d0f776e24 Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Wed, 13 Sep 2023 04:39:54 -0500 Subject: [PATCH] Automatically generate some (duplicating) entries using a range. --- app/controllers/movies_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/controllers/movies_controller.rb b/app/controllers/movies_controller.rb index 5b1fd53..bf97e36 100644 --- a/app/controllers/movies_controller.rb +++ b/app/controllers/movies_controller.rb @@ -1,5 +1,9 @@ class MoviesController < ApplicationController def index @movies = ["Iron Man", "Batman"] + (0..15).each{ |num| + @movies.append(num.odd? ? "Batman" : "Iron Man") + @movies.append("Forrest Gump") + } end end