 
     Api.current.post '/projects/notes_from_nature/badges', { badge: badge }, (data) ->
       Badge.getUserBadges()
-
-  @previousReport: ->
-    for badge in User.current.badges
-      if badge.name is 'summary' then return badge
-
-    return false
-
 
   @findBySlug: (slug) ->
     result = @select (b) ->

        User.current.badges.push badge

  @processReport: (name, created_at) ->
    ccAtTime = parseInt(name.replace('summary_',''))

    previousReport = @previousReport()
    if previousReport
      number = ccAtTime - previousReport.number
    else
      number = ccAtTime

    User.current.badges.push {name: 'summary', number: number, created_at: created_at}

  @updateReport: ->
    reports = (moment(badge.created_at).diff(moment(), 'weeks') for badge in User.current.badges when badge.name is 'summary')

        User.current.badges = []

        for badge in badges
          @insertIntoUser badge[0], badge[1]

        Badge.updateReport()

