diff options
author | Ben Harris <ben@tilde.team> | 2021-08-27 00:40:47 -0400 |
---|---|---|
committer | Ben Harris <ben@tilde.team> | 2021-08-27 00:40:47 -0400 |
commit | 68f5f71701f53dffba53b3390b8e01cc23cc3d9c (patch) | |
tree | f1facb60eae12c62fc7801a7b793a4cc7c1e3588 /app/controllers/pages_controller.rb | |
parent | 54901541e35b29fcdc05cf036b1eeb203df7bd7d (diff) |
switch to turbo
Diffstat (limited to 'app/controllers/pages_controller.rb')
-rw-r--r-- | app/controllers/pages_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index 2c454f9..923edf2 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -6,14 +6,14 @@ class PagesController < ApplicationController def teampicker @groups = maketeams - @machines = Machine.limit(@groups.count).order(Arel.sql("RANDOM()")) + @machines = Machine.limit(@groups.size).order(Arel.sql("RANDOM()")) end private def maketeams r = Player.where("strikes < 4").order(Arel.sql("RANDOM()")).to_a - groups = case r.count + groups = case r.size when 5 [r.shift(3), r.shift(2)] when 6 |