Class: SquadGoals::App

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/squad_goals/app.rb

Constant Summary collapse

MEMCACHE_TTL =

TTL for caching team info, in seconds

60 * 5

Instance Method Summary collapse

Instance Method Details

#localsObject



54
55
56
57
58
59
60
61
62
# File 'lib/squad_goals/app.rb', line 54

def locals
  {
    organization: settings.organization,
    teams: settings.organization.teams,
    org_id: settings.organization.,
    team_requested: team_requested,
    user: (github_user. if github_user)
  }
end

#team_requestedObject



44
45
46
# File 'lib/squad_goals/app.rb', line 44

def team_requested
  settings.organization.teams.find { |team| team.slug == params['team'] }
end