Skip to content

Commit

Permalink
Implemented flash when game configurations are invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
lisahamm committed Feb 26, 2015
1 parent af668e9 commit 5f31688
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tic_tac_toe_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ class TicTacToeController < Sinatra::Base
post '/setup' do
@setup = GameSetup.new(params)
if @setup.invalid?
@
flash[:errors] = @setup.errors
p flash[:errors]
erb :index
else
session[:mark] = params[:player_mark]
Expand Down

0 comments on commit 5f31688

Please sign in to comment.