diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/machines_controller.rb | 4 | ||||
-rw-r--r-- | app/controllers/pages_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/players_controller.rb | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/app/controllers/machines_controller.rb b/app/controllers/machines_controller.rb index 3145fd1..cea2adc 100644 --- a/app/controllers/machines_controller.rb +++ b/app/controllers/machines_controller.rb @@ -20,7 +20,7 @@ class MachinesController < ApplicationController @machine = Machine.new(machine_params) if @machine.save - redirect_to @machine + redirect_to machines_path else render :new end @@ -34,7 +34,7 @@ class MachinesController < ApplicationController @machine = Machine.find(params[:id]) if @machine.update(machine_params) - redirect_to @machine + redirect_to machines_path else render :edit end diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index 923edf2..76fe03a 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -11,7 +11,7 @@ class PagesController < ApplicationController private def maketeams - r = Player.where("strikes < 4").order(Arel.sql("RANDOM()")).to_a + r = Player.where("strikes < 3").order(Arel.sql("RANDOM()")).to_a groups = case r.size when 5 diff --git a/app/controllers/players_controller.rb b/app/controllers/players_controller.rb index c67e4dd..ac12135 100644 --- a/app/controllers/players_controller.rb +++ b/app/controllers/players_controller.rb @@ -15,7 +15,7 @@ class PlayersController < ApplicationController @player = Player.new(player_params) if @player.save - redirect_to @player + redirect_to players_path else render :new end @@ -29,7 +29,7 @@ class PlayersController < ApplicationController @player = Player.find(params[:id]) if @player.update(player_params) - redirect_to @player + redirect_to players_path else render :edit end |