Compare commits

...

3 Commits

Author SHA1 Message Date
efb6d26a55 Add the bootstrap theme
FIXME: external imports might get out of hand at scale
FIXME: I didn't version the version of bootstrap so scaling will
definitely make things break eventually
2023-09-13 04:59:51 -05:00
57bc2cfac8 Prevent duplicates. Refreshing the page successfully gives a different result every time. 2023-09-13 04:56:23 -05:00
86a262f11b Use sample, that seems cooler. 2023-09-13 04:54:53 -05:00
2 changed files with 3 additions and 3 deletions

View File

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

View File

@ -7,6 +7,7 @@
<%= csp_meta_tag %> <%= csp_meta_tag %>
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %> <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
<%= stylesheet_link_tag "application", "https://cdn.jsdelivr.net/npm/bootstrap/dist/css/bootstrap.min.css" %>
<%= javascript_importmap_tags %> <%= javascript_importmap_tags %>
</head> </head>