# File app/models/milestone.rb, line 10 def self.active where("due_date > ? OR due_date IS NULL", Date.today) end
# File app/models/milestone.rb, line 24 def expires_at "expires at #{due_date.stamp("Aug 21, 2011")}" if due_date end
# File app/models/milestone.rb, line 14 def participants User.where(id: issues.pluck(:assignee_id)) end
# File app/models/milestone.rb, line 18 def percent_complete ((self.issues.closed.count * 100) / self.issues.count).abs rescue ZeroDivisionError 100 end