Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 988ea4e467
Fetching contributors…

Cannot retrieve contributors at this time

37 lines (28 sloc) 0.86 kb
class ApplicationController < ActionController::Base
protect_from_forgery
private
def not_authenticated
redirect_to login_url, :alert => "First login to access this page."
end
def get_tournaments(tourns)
tournaments = []
tourns.each do |tourn|
facility = tourn.tournament_facilities.main.first.facility
tournaments << {:tournament => tourn, :facility => facility }
end
tournaments
end
def get_team_tournaments(tourns, team)
tournaments = []
tourns.each do |tourn|
facility = tourn.tournament_facilities.main.first.facility
tournament_team = TournamentTeam.where(:tournament_id => tourn.id, :team_id => team.id )
tournaments << {
:tournament => tourn,
:facility => facility,
:tournament_team => tournament_team
}
end
tournaments
end
end
Jump to Line
Something went wrong with that request. Please try again.