diff options
author | Sean McGivern <sean@gitlab.com> | 2017-04-06 13:12:12 +0100 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-04-14 15:20:55 +0200 |
commit | ac0146a08eb2ec6c23b46ea014376b7a70a21415 (patch) | |
tree | 447f113a087fe5c001e4b3a6b441ef9ac65680c0 /app/controllers | |
parent | 61eaf4fe1755799c42e474019759e3859e6b2926 (diff) | |
download | gitlab-ce-ac0146a08eb2ec6c23b46ea014376b7a70a21415.tar.gz |
Use serializer for formatting cohorts data
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/admin/cohorts_controller.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/admin/cohorts_controller.rb b/app/controllers/admin/cohorts_controller.rb index 947afe3a028..9b77c554908 100644 --- a/app/controllers/admin/cohorts_controller.rb +++ b/app/controllers/admin/cohorts_controller.rb @@ -1,9 +1,11 @@ class Admin::CohortsController < Admin::ApplicationController def index - if ApplicationSetting.current.usage_ping_enabled - @cohorts = Rails.cache.fetch('cohorts', expires_in: 1.day) do + 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 |