# class Milestone

### Public Class Methods

active() click to toggle source

    # File app/models/milestone.rb, line 10
    def self.active
      where("due_date > ? OR due_date IS NULL", Date.today)
    end

### Public Instance Methods

expires_at() click to toggle source

    # File app/models/milestone.rb, line 24
    def expires_at
      "expires at #{due_date.stamp("Aug 21, 2011")}" if due_date
    end

participants() click to toggle source

    # File app/models/milestone.rb, line 14
    def participants
      User.where(id: issues.pluck(:assignee_id))
    end

percent_complete() click to toggle source

    # File app/models/milestone.rb, line 18
    def percent_complete
      ((self.issues.closed.count * 100) / self.issues.count).abs
    rescue ZeroDivisionError
      100
    end