Class: GamesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/games_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject


6
7
8
9
# File 'app/controllers/games_controller.rb', line 6

def create
  games_repository.create(game_params)
  redirect_to games_path
end

#indexObject


2
3
4
# File 'app/controllers/games_controller.rb', line 2

def index
  render :index, locals: { game: games_repository.new, games: games_repository.all }
end