Permalink
Browse files

Remove ability to make unbounded subscribe count calculations on sign…

…atures table.
  • Loading branch information...
1 parent 04c019d commit d94a5c249f3130f72d9a876b55d58a3cd9093a11 @bguthrie bguthrie committed Sep 9, 2013
View
4 app/models/admin/heartbeat.rb
@@ -16,10 +16,6 @@ def emailable_members
Member.count - Unsubscribe.count
end
- def new_members
- Signature.where(created_member: true).count - Unsubscribe.where("cause='unsubscribed'").count
- end
-
def status
status = ApplicationStatus.new.tap do |s|
s[:email] = EmailStatus.new self, true
View
4 app/models/metrics/nps.rb
@@ -16,6 +16,10 @@ def ups
unsubscribes.to_f / actions.to_f
end
+ def net
+ subscribes - unsubscribes
+ end
+
def nps
sps - ups
end
View
3 app/models/statistics.rb
@@ -23,8 +23,7 @@ def heartbeat
last_email: @heartbeat.last_sent_email,
last_signature: @heartbeat.last_signature,
emails_sent_past_week: @heartbeat.emails_sent_since(1.week.ago),
- emailable_member_count: @heartbeat.emailable_members,
- new_members: @heartbeat.new_members
+ emailable_member_count: @heartbeat.emailable_members
}
end
View
4 app/views/admin/dashboard/index.html.haml
@@ -143,9 +143,9 @@
= number_with_delimiter heartbeat[:emailable_member_count]
%tr
%td
- Total net new members:
+ Net new members past week:
%td.numeric
- = number_with_delimiter heartbeat[:new_members]
+ = number_with_delimiter @statistics.nps_7d.net
%table.table.table-condensed.bordered-table.table-striped
%tr
%td

0 comments on commit d94a5c2

Please sign in to comment.