debian-mirror-gitlab/app/finders/milestones_finder.rb

13 lines
298 B
Ruby
Raw Normal View History

2015-11-26 14:37:03 +05:30
class MilestonesFinder
def execute(projects, params)
milestones = Milestone.of_projects(projects)
2015-12-23 02:04:40 +05:30
milestones = milestones.reorder("due_date ASC")
2015-11-26 14:37:03 +05:30
case params[:state]
when 'closed' then milestones.closed
when 'all' then milestones
else milestones.active
end
end
end