1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-07 14:57:48 +00:00

Revert "Added memcached and set up cached items for up_matches page"

This reverts commit 983cc9c667.
This commit is contained in:
2015-12-17 19:20:18 +00:00
parent 983cc9c667
commit 54ecbe9451
7 changed files with 7 additions and 34 deletions

View File

@@ -66,8 +66,8 @@ class TournamentsController < ApplicationController
def up_matches
@matches = @tournament.cached_matches.select{|m| m.mat_id == nil}.sort_by{|m| m.bout_number}
@mats = @tournament.mats
@matches = @tournament.matches.where(mat_id: nil).order('bout_number ASC').limit(10).includes(:wrestlers)
@mats = @tournament.mats.includes(:matches)
end
def index
@@ -144,7 +144,7 @@ class TournamentsController < ApplicationController
def check_for_matches
if @tournament
if @tournament.cached_matches.empty?
if @tournament.matches.empty?
redirect_to "/tournaments/#{@tournament.id}/no_matches"
end
end