From 42540e7645eaa4abd2bbae767149e07ddb2ab482 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 7 Apr 2014 11:33:12 -0400 Subject: fix indent --- app/controllers/matches_controller.rb | 11 ++++----- app/models/tournament.rb | 42 +++++++++++++++++------------------ 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?('=') -- cgit v1.2.3-2-g168b