debian-mirror-gitlab/app/finders/milestones_finder.rb
2015-11-26 14:37:03 +05:30

12 lines
296 B
Ruby

class MilestonesFinder
def execute(projects, params)
milestones = Milestone.of_projects(projects)
milestones = milestones.order("due_date ASC")
case params[:state]
when 'closed' then milestones.closed
when 'all' then milestones
else milestones.active
end
end
end