diff options
author | Heinrich Lee Yu <hleeyu@gmail.com> | 2019-01-11 17:58:18 +0300 |
---|---|---|
committer | Heinrich Lee Yu <hleeyu@gmail.com> | 2019-01-11 19:05:36 +0300 |
commit | 2f76ff19f8f520a584a1259bd0c779e988cd7360 (patch) | |
tree | bd520f3064a21ece51da2418f2f3b67c2bacfc4f /app/controllers | |
parent | 6b2f81f6078e96f081154c50dc25e54fe7c09d6f (diff) |
Fix MilestonesFinder to pass relations to scope
Instead of querying relations into ids we just pass them to the model
scope because the scope supports it now.
Also changes other calls to `Milestone.for_projects_and_groups`
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/milestones_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/projects/milestones_controller.rb b/app/controllers/projects/milestones_controller.rb index 8e68014a30d..8bc59d8a305 100644 --- a/app/controllers/projects/milestones_controller.rb +++ b/app/controllers/projects/milestones_controller.rb @@ -144,7 +144,7 @@ class Projects::MilestonesController < Projects::ApplicationController def search_params if request.format.json? && project_group && can?(current_user, :read_group, project_group) - groups = project_group.self_and_ancestors_ids + groups = project_group.self_and_ancestors.select(:id) end params.permit(:state).merge(project_ids: @project.id, group_ids: groups) |