Automatically generate some (duplicating) entries using a range.

This commit is contained in:
Simon Quigley 2023-09-13 04:39:54 -05:00
parent d914bcd1dc
commit 020e9b08f9

View File

@ -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