Commit 83bc6923 authored by Mario de la Ossa's avatar Mario de la Ossa

Extract EE-specific code from app/controllers/groups/milestones_controller.rb

parent 546d11f4
class Groups::MilestonesController < Groups::ApplicationController
prepend EE::Groups::MilestonesController
include MilestoneActions
before_action :group_projects
......@@ -77,17 +79,14 @@ class Groups::MilestonesController < Groups::ApplicationController
def milestones
milestones = MilestonesFinder.new(search_params).execute
legacy_milestones =
if params[:only_group_milestones]
[]
else
GroupMilestone.build_collection(group, group_projects, params)
end
@sort = params[:sort] || 'due_date_asc'
MilestoneArray.sort(milestones + legacy_milestones, @sort)
end
def legacy_milestones
GroupMilestone.build_collection(group, group_projects, params)
end
def milestone
@milestone =
if params[:title]
......
module EE
module Groups
module MilestonesController
extend ::Gitlab::Utils::Override
override :legacy_milestones
def legacy_milestones
params[:only_group_milestones] ? [] : super
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment