about summary refs log tree commit diff
path: root/app/lib/admin/metrics
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-01-23 16:01:25 +0100
committerGitHub <noreply@github.com>2022-01-23 16:01:25 +0100
commita63495230a3a28e022504f36356cd75b17b635ba (patch)
tree02ee97effb903d57cc8f310b334153749c276795 /app/lib/admin/metrics
parentbddd9ba36d9f4e86e2a4bbea77f967c143afa2cc (diff)
Change `percent` to `rate` in retention metrics API (#16910)
Diffstat (limited to 'app/lib/admin/metrics')
-rw-r--r--app/lib/admin/metrics/retention.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/lib/admin/metrics/retention.rb b/app/lib/admin/metrics/retention.rb
index 6b9dfde49..0179a6e28 100644
--- a/app/lib/admin/metrics/retention.rb
+++ b/app/lib/admin/metrics/retention.rb
@@ -6,7 +6,7 @@ class Admin::Metrics::Retention
   end
 
   class CohortData < ActiveModelSerializers::Model
-    attributes :date, :percent, :value
+    attributes :date, :rate, :value
   end
 
   def initialize(start_at, end_at, frequency)
@@ -59,7 +59,7 @@ class Admin::Metrics::Retention
 
       current_cohort.data << CohortData.new(
         date: row['retention_period'],
-        percent: rate.to_f,
+        rate: rate.to_f,
         value: value.to_s
       )
     end