BigW Consortium Gitlab

Commit 50a16c4b by Phil Hughes

Updated Ruby

parent 672bd4e6
...@@ -39,8 +39,11 @@ class AutocompleteController < ApplicationController ...@@ -39,8 +39,11 @@ class AutocompleteController < ApplicationController
current_user.can?(:admin_issue, project) current_user.can?(:admin_issue, project)
end end
no_project = OpenStruct.new(id: 0, name_with_namespace: 'No project') no_project = {
projects.unshift(no_project.to_h) id: 0,
name_with_namespace: 'No project',
}
projects.unshift(no_project)
projects.delete(project) projects.delete(project)
render json: projects.to_json(only: [:id, :name_with_namespace], methods: :name_with_namespace) render json: projects.to_json(only: [:id, :name_with_namespace], methods: :name_with_namespace)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment