Skip to content

Instantly share code, notes, and snippets.

@meltzerj
Created May 6, 2011 22:12
Show Gist options
  • Select an option

  • Save meltzerj/959894 to your computer and use it in GitHub Desktop.

Select an option

Save meltzerj/959894 to your computer and use it in GitHub Desktop.
def notification_count(user)
new_notifcation_count = new_notification_count || 0
new_notification_count = new_notification_count + user.notifications.count
return new_notification_count
end
def erase_notification_count
new_notification_count = current_user.notifications.count * (-1)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment