summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorLuke Shumaker <shumakl@purdue.edu>2014-04-07 11:33:12 -0400
committerLuke Shumaker <shumakl@purdue.edu>2014-04-07 11:33:12 -0400
commit42540e7645eaa4abd2bbae767149e07ddb2ab482 (patch)
treea6b6cedc9b7ef1c701a558a0f35cfeef871a56aa /app
parent45df045451bdafb630a5bbdb812510e35f2d2a2d (diff)
fix indent
Diffstat (limited to 'app')
-rw-r--r--app/controllers/matches_controller.rb11
-rw-r--r--app/models/tournament.rb42
2 files changed, 27 insertions, 26 deletions
diff --git a/app/controllers/matches_controller.rb b/app/controllers/matches_controller.rb
index 69ea23b..0704e5d 100644
--- a/app/controllers/matches_controller.rb
+++ b/app/controllers/matches_controller.rb
@@ -22,8 +22,8 @@ class MatchesController < ApplicationController
tournament_matches_path(@tournament)
end
- def get_riot_info
- if signed_in?
+ def get_riot_info
+ if signed_in?
pull = "Kaceytron"
#current user information
@@ -107,7 +107,7 @@ class MatchesController < ApplicationController
purple.merge!("#{place}" => info["games"][0]["stats"])
end
sleep(1)
- end
+ end
if 100 == recent["games"][0]["stats"]["team"]
blue.merge!("#{players[9]}" => recent["games"][0]["stats"])
@@ -118,8 +118,9 @@ class MatchesController < ApplicationController
@purp = purple
@blue = blue
- end #end if
- end #end def
+ end #end if
+ end #end def
+
# GET /matches/1
# GET /matches/1.json
diff --git a/app/models/tournament.rb b/app/models/tournament.rb
index 4cbbf95..d3ef12a 100644
--- a/app/models/tournament.rb
+++ b/app/models/tournament.rb
@@ -34,27 +34,27 @@ class Tournament < ActiveRecord::Base
:range => 4
}
- def initialize(tournament)
- @tournament = tournament
- end
+ def initialize(tournament)
+ @tournament = tournament
+ end
- def [](preference)
- p = @tournament.preferences_raw.find_by_name(preference)
- if p.nil?
- return nil
- else
- return p.value
- end
- end
+ def [](preference)
+ p = @tournament.preferences_raw.find_by_name(preference)
+ if p.nil?
+ return nil
+ else
+ return p.value
+ end
+ end
- def []=(preference, val)
- p = @tournament.preferences_raw.find_by_name(preference)
- if p.nil?
+ def []=(preference, val)
+ p = @tournament.preferences_raw.find_by_name(preference)
+ if p.nil?
TournamentPreference.create( tournament_id: @tournament.id, vartype: get_type(val), name: preference, value: val )
- else
- p.value = val
- end
- end
+ else
+ p.value = val
+ end
+ end
def get_type(val)
case val
@@ -71,9 +71,9 @@ class Tournament < ActiveRecord::Base
end
end
- def keys
- @tournament.preferences_raw.all.collect { |x| x.name }
- end
+ def keys
+ @tournament.preferences_raw.all.collect { |x| x.name }
+ end
def method_missing(name, *args)
if name.to_s.ends_with?('=')