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