From 28f7378d7d2bc2d79fa52f3dcedb734a543f69be Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 4 Mar 2014 18:48:22 -0500 Subject: fix SessionsController#create --- app/controllers/sessions_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers') diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index a74cbd3..c3ff395 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -13,7 +13,7 @@ class SessionsController < ApplicationController respond_to do |format| if @user && @user.authenticate(params[:session][:password]) sign_in @user - redirect_to root_path + format.html { redirect_to root_path } else format.html { render action: 'new' } format.json { render json: @user.errors, status: :unprocessable_entity } -- cgit v1.2.3-2-g168b From e586c3e2b30698ea5a1c83c19ea446c4be89fd54 Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Tue, 4 Mar 2014 18:57:50 -0500 Subject: Here's to messing everything up. --- app/controllers/tournaments_controller.rb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'app/controllers') diff --git a/app/controllers/tournaments_controller.rb b/app/controllers/tournaments_controller.rb index 27ba020..5c53693 100644 --- a/app/controllers/tournaments_controller.rb +++ b/app/controllers/tournaments_controller.rb @@ -15,6 +15,7 @@ class TournamentsController < ApplicationController # GET /tournaments/new def new @game_names = Game.all.collect + @game = params[:game] @tournament = Tournament.new end @@ -22,12 +23,6 @@ class TournamentsController < ApplicationController def edit end - def selected - render :update do |page| - page.replace_html 'ajax-form', :partial => 'selected' - end - end - # POST /tournaments # POST /tournaments.json def create @@ -76,6 +71,6 @@ class TournamentsController < ApplicationController # Never trust parameters from the scary internet, only allow the white list through. def tournament_params - params.require(:tournament).permit(:game_id) + params.require(:tournament).permit(:game_id, :game) end end -- cgit v1.2.3-2-g168b