Commit 50a16c4b authored by Phil Hughes's avatar Phil Hughes

Updated Ruby

parent 672bd4e6
......@@ -39,8 +39,11 @@ class AutocompleteController < ApplicationController
current_user.can?(:admin_issue, project)
end
no_project = OpenStruct.new(id: 0, name_with_namespace: 'No project')
projects.unshift(no_project.to_h)
no_project = {
id: 0,
name_with_namespace: 'No project',
}
projects.unshift(no_project)
projects.delete(project)
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