diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/sessions_helper.rb | 4 | ||||
-rw-r--r-- | app/models/match.rb | 3 | ||||
-rw-r--r-- | app/views/matches/show.html.erb | 19 |
3 files changed, 24 insertions, 2 deletions
diff --git a/app/helpers/sessions_helper.rb b/app/helpers/sessions_helper.rb index 89e5ef3..60ddfa6 100644 --- a/app/helpers/sessions_helper.rb +++ b/app/helpers/sessions_helper.rb @@ -5,8 +5,8 @@ module SessionsHelper @session.save # FIXME: error handling @token = Session.hash_token(raw_token) - cookies.permanent[:remember_token] = raw_token - + #cookies.permanent[:remember_token] = raw_token + cookies.permanent[:remember_token] = { value: remember_token, expires: 20.minutes.from_now.utc } #set the current user to be the given user @current_user = user end diff --git a/app/models/match.rb b/app/models/match.rb index 35deb20..c596ced 100644 --- a/app/models/match.rb +++ b/app/models/match.rb @@ -5,4 +5,7 @@ class Match < ActiveRecord::Base belongs_to :winner, class_name: "Team" + def setup() + + end end diff --git a/app/views/matches/show.html.erb b/app/views/matches/show.html.erb index 53c3b38..4973dc3 100644 --- a/app/views/matches/show.html.erb +++ b/app/views/matches/show.html.erb @@ -12,7 +12,24 @@ <strong>Name:</strong> <%= @match.name %> </p> +<!-- + Match Status 0 => Pairings Stage + Match Status 1 => Match Active + Match Status 2 => Match Finished (Peer Review Starts) + Match Status 3 => Match Completed (Scores Completed OR Results Page) + Four views:- (status is Match status) + A. Pairings, when status is 0 for either Host or Player Or when status is 1 for player + B. A page the host will see if status is 1 OR 2 + C. The Peer review page that the players will see if status is 2. + D. The page everyone will see when status is 3. + + Note:- The change of status from 1 to 2 is coming from League Data Pull (RIOT API) + +--> +<!-- + This is what the HOST will see when the Match Status is NOT 3 +--> <% if (@tournament.hosts.include?(current_user) and @match.winner.nil?) %> <%= form_for([@tournament, @match], method: "put") do |f| %> <ul> @@ -25,6 +42,8 @@ <% end %> <% end %> + + <% unless @match.winner.nil? %> <p> <strong>Winner:</strong> |