about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-01-23 18:13:55 +0100
committerClaire <claire.github-309c@sitedethib.com>2022-01-23 18:24:01 +0100
commit61ef81c548a0140a80281d4004ac55873d8f74d6 (patch)
tree770c251059d139243b9cb557c762648e0af55037 /app/lib
parent4d0383d75ac606f8c9c2b8ecb0ea2dddf28213cb (diff)
parent0a120d86d28e3f2e20455f56c1656f5d5f2f4af6 (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `spec/models/status_spec.rb`:
  Upstream added tests too close to glitch-soc-specific tests.
  Kept both tests.
Diffstat (limited to 'app/lib')
-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