Permalink
Browse files

Removed redundant where-clause.

  • Loading branch information...
1 parent d94a5c2 commit da42676a8b6a6cf3bcd84459a3fef83301ebd167 @bguthrie bguthrie committed Sep 9, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/models/metrics/nps.rb
@@ -58,15 +58,15 @@ def email_by_timeframe(time_ago, opts={})
def email_aggregate(since)
actions = ScheduledEmail.where("created_at > ?", since).count
- subscribes = Signature.created.where("created_at > ?", since).where(created_member: true).count
+ subscribes = Signature.created.where("created_at > ?", since).count
unsubscribes = Unsubscribe.where("cause='unsubscribed' and created_at > ?", since).count
Metrics::Nps.new id: since, actions: actions, subscribes: subscribes, unsubscribes: unsubscribes
end
def facebook_aggregate(since)
actions = FacebookAction.where("created_at > ?", since).count
- subscribes = Signature.created.where("created_at > ?", since).where(created_member: true).count
+ subscribes = Signature.created.where("created_at > ?", since).count
unsubscribes = Unsubscribe.where("cause='unsubscribed' and created_at > ?", since).count
Metrics::Nps.new id: since, actions: actions, subscribes: subscribes, unsubscribes: unsubscribes

0 comments on commit da42676

Please sign in to comment.