diff --git a/Gemfile b/Gemfile
index 49f494c..9ccbede 100644
--- a/Gemfile
+++ b/Gemfile
@@ -42,9 +42,10 @@ gem 'spring', :group => :development
group :production do
gem 'rails_12factor'
gem 'mysql2'
- gem 'passenger'
- gem 'therubyracer'
+ gem 'passenger'
+ gem 'therubyracer'
gem 'newrelic_rpm'
+ gem 'dalli'
end
#Other
gem 'devise'
diff --git a/Gemfile.lock b/Gemfile.lock
index 1496c23..d17ca7a 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -48,6 +48,7 @@ GEM
execjs
coffee-script-source (1.9.1.1)
concurrent-ruby (1.0.0)
+ dalli (2.7.5)
devise (3.4.1)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
@@ -160,6 +161,7 @@ PLATFORMS
DEPENDENCIES
cancancan
coffee-rails (~> 4.0.0)
+ dalli
devise
jbuilder (~> 2.0)
jquery-rails
diff --git a/app/models/match.rb b/app/models/match.rb
index 64ce59b..70ce5f8 100644
--- a/app/models/match.rb
+++ b/app/models/match.rb
@@ -1,7 +1,7 @@
class Match < ActiveRecord::Base
- belongs_to :tournament
- belongs_to :weight
- belongs_to :mat
+ belongs_to :tournament, touch: true
+ belongs_to :weight, touch: true
+ belongs_to :mat, touch: true
has_many :wrestlers, :through => :weight
after_save do
diff --git a/app/views/tournaments/bracket.html.erb b/app/views/tournaments/bracket.html.erb
index f1735ee..293be18 100644
--- a/app/views/tournaments/bracket.html.erb
+++ b/app/views/tournaments/bracket.html.erb
@@ -1,23 +1,25 @@
-
-
-
-
-<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}", :class=>"btn btn-default" %>
-
-
-
| Mat | -On Mat | -On Deck | -In The Hole | -Warm Up | -
|---|
| <%= m.name %> | -<% if m.unfinishedMatches.first %><%=m.unfinishedMatches.first.bout_number%> <%= m.unfinishedMatches.first.w1_name %> vs. <%= m.unfinishedMatches.first.w2_name %><% end %> |
- <% if m.unfinishedMatches.second %><%=m.unfinishedMatches.second.bout_number%> <%= m.unfinishedMatches.second.w1_name %> vs. <%= m.unfinishedMatches.second.w2_name %><% end %> |
- <% if m.unfinishedMatches.third %><%=m.unfinishedMatches.third.bout_number%> <%= m.unfinishedMatches.third.w1_name %> vs. <%= m.unfinishedMatches.third.w2_name %><% end %> |
- <% if m.unfinishedMatches.fourth %><%=m.unfinishedMatches.fourth.bout_number%> <%= m.unfinishedMatches.fourth.w1_name %> vs. <%= m.unfinishedMatches.fourth.w2_name %><% end %> |
+ Mat | +On Mat | +On Deck | +In The Hole | +Warm Up |
|---|
| Round | -Bout Number | -Weight Class | -Matchup | -|
|---|---|---|---|---|
| <%= m.name %> | +<% if m.unfinishedMatches.first %><%=m.unfinishedMatches.first.bout_number%> <%= m.unfinishedMatches.first.w1_name %> vs. <%= m.unfinishedMatches.first.w2_name %><% end %> |
+ <% if m.unfinishedMatches.second %><%=m.unfinishedMatches.second.bout_number%> <%= m.unfinishedMatches.second.w1_name %> vs. <%= m.unfinishedMatches.second.w2_name %><% end %> |
+ <% if m.unfinishedMatches.third %><%=m.unfinishedMatches.third.bout_number%> <%= m.unfinishedMatches.third.w1_name %> vs. <%= m.unfinishedMatches.third.w2_name %><% end %> |
+ <% if m.unfinishedMatches.fourth %><%=m.unfinishedMatches.fourth.bout_number%> <%= m.unfinishedMatches.fourth.w1_name %> vs. <%= m.unfinishedMatches.fourth.w2_name %><% end %> |
+
| Round <%= m.round %> | -<%= m.bout_number %> | -<%= m.weight_max %> lbs | -<%= m.w1_name %> vs. <%= m.w2_name %> | +Round | +Bout Number | +Weight Class | +Matchup |
|---|