debian-mirror-gitlab/app/controllers/admin/cohorts_controller.rb

12 lines
334 B
Ruby
Raw Normal View History

2017-08-17 22:00:37 +05:30
class Admin::CohortsController < Admin::ApplicationController
def index
if current_application_settings.usage_ping_enabled
cohorts_results = Rails.cache.fetch('cohorts', expires_in: 1.day) do
CohortsService.new.execute
end
@cohorts = CohortsSerializer.new.represent(cohorts_results)
end
end
end