Add project scope to milestone search

This commit is contained in:
Zeger-Jan van de Weg 2015-10-14 12:20:48 +02:00
parent b5762104ab
commit ac44e3844d

View file

@ -81,7 +81,14 @@ class IssuableFinder
@milestones = @milestones =
if milestones? if milestones?
Milestone.where(title: params[:milestone_title]) scope =
if project
project.milestones
else
Milestone.all
end
scope.where(title: params[:milestone_title])
else else
nil nil
end end