From 00f3d70445d7cae0976ec9794e555c52a1765b24 Mon Sep 17 00:00:00 2001 From: nfoy Date: Sat, 26 Apr 2014 20:57:21 -0400 Subject: Messages is working (besides default permissions)! --- app/controllers/pms_controller.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'app/controllers') diff --git a/app/controllers/pms_controller.rb b/app/controllers/pms_controller.rb index c83d2ae..3368663 100644 --- a/app/controllers/pms_controller.rb +++ b/app/controllers/pms_controller.rb @@ -57,6 +57,7 @@ class PmsController < ApplicationController format.json { render json: @pm.errors, status: :unprocessable_entity } end end + current_user.reply_to_conversation(@pm.conversation, @pm.message) end # DELETE /pms/1 -- cgit v1.2.3-2-g168b From a9a59bf0199c761ada889f23274aa0a56da50554 Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Sat, 26 Apr 2014 21:05:46 -0400 Subject: lib methods for tournament_stage --- app/controllers/matches_controller.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/controllers') diff --git a/app/controllers/matches_controller.rb b/app/controllers/matches_controller.rb index a2a1269..4a20df2 100644 --- a/app/controllers/matches_controller.rb +++ b/app/controllers/matches_controller.rb @@ -230,11 +230,14 @@ class MatchesController < ApplicationController base_score = next_score next_score += base_score end + @match.submitted_peer_evaluations += 1 players = []; @match.teams.each{|t| players.concat(t.users.all)} if (@match.submitted_peer_evaluations == players.count) @match.status = 3 end + + respond_to do |format| if @match.save format.html { redirect_to tournament_match_path(@tournament, @match), notice: 'Scores Submitted' } -- cgit v1.2.3-2-g168b