Automatically generate some (duplicating) entries using a range.

main
Simon Quigley 1 year ago
parent d914bcd1dc
commit 020e9b08f9

@ -1,5 +1,9 @@
class MoviesController < ApplicationController class MoviesController < ApplicationController
def index def index
@movies = ["Iron Man", "Batman"] @movies = ["Iron Man", "Batman"]
(0..15).each{ |num|
@movies.append(num.odd? ? "Batman" : "Iron Man")
@movies.append("Forrest Gump")
}
end end
end end

Loading…
Cancel
Save