app/models/user.rb
# The `raw_streak_count` is the value stored in the
# DB. This value should be updated when a user clicks on an
# email.
#
# The `emails_missed_since_click` is updated every time
# we send an email.
#
# The streak count is the prior saved streak minus the number
# of emails the user has not clicked.
The `raw_streak_count` is the value stored in the
DB. This value should be updated when a user clicks on an
email.

The `emails_missed_since_click` is updated every time
we send an email.

The streak count is the prior saved streak minus the number
of emails the user has not clicked.
The ` raw_streak_count ` is the value stored in the DB . This value should be updated when a user clicks on an email . The ` emails_missed_since_click ` is updated every time we send an email . The streak count is the prior saved streak minus the number of emails the user has not clicked .
def effective_streak_count
    value = raw_streak_count - emails_missed_since_click
    return 0 if value < 0
    return value
  end
def effective_streak_count value = raw_streak_count - emails_missed_since_click return 0 if value < 0 return value end
The `raw_streak_count` is the value stored in the
DB.
The ` raw_streak_count ` is the value stored in the DB .