From a45cb688095eda294b0242a09d28168d4e279421 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Thu, 17 Mar 2016 10:40:54 +0000 Subject: [PATCH] Fixed failing tests --- app/controllers/projects/milestones_controller.rb | 2 +- app/helpers/labels_helper.rb | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/app/controllers/projects/milestones_controller.rb b/app/controllers/projects/milestones_controller.rb index 7b70f5fa7d7..0998b191c07 100644 --- a/app/controllers/projects/milestones_controller.rb +++ b/app/controllers/projects/milestones_controller.rb @@ -25,7 +25,7 @@ class Projects::MilestonesController < Projects::ApplicationController @milestones = @milestones.page(params[:page]).per(PER_PAGE) end format.json do - render json: @milestones_all + render json: @milestones end end end diff --git a/app/helpers/labels_helper.rb b/app/helpers/labels_helper.rb index 361811163f9..49f701e9bee 100644 --- a/app/helpers/labels_helper.rb +++ b/app/helpers/labels_helper.rb @@ -110,12 +110,11 @@ module LabelsHelper end def projects_labels_options - labels = - if @project - @project.labels - else - Label.where(project_id: @projects) - end + if @project + @project.labels + else + Label.where(project_id: @projects) + end end def labels_filter_path