Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-07-19 12:05:38 +0300
committerPhil Hughes <me@iamphill.com>2016-07-20 12:48:02 +0300
commit47d8fb84d80d23432c9afea055da4c56ea749206 (patch)
tree27ae6c31b70e823a3a99a682190bb047e38f1537 /app/helpers/milestones_helper.rb
parentc54d2a030ca9753282640e8247e4df6c250477fa (diff)
Uses the selected values from the controller not the params
Added tests for new merge requests from forked project & owned project
Diffstat (limited to 'app/helpers/milestones_helper.rb')
-rw-r--r--app/helpers/milestones_helper.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/app/helpers/milestones_helper.rb b/app/helpers/milestones_helper.rb
index 90f83f5fde5..f678e1540de 100644
--- a/app/helpers/milestones_helper.rb
+++ b/app/helpers/milestones_helper.rb
@@ -56,13 +56,7 @@ module MilestonesHelper
end
def milestone_dropdown_selected_text(selected)
- project = @target_project || @project || @projects
-
- if selected.is_a? Integer
- Milestone.of_projects(project).where(id: selected).first.try(:title)
- else
- Milestone.of_projects(project).where(title: selected).first.try(:title)
- end
+ selected.try(:title) unless selected.nil?
end
def milestone_remaining_days(milestone)