diff options
author | Phil Hughes <me@iamphill.com> | 2016-05-25 15:26:02 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-05-25 15:26:02 +0100 |
commit | 50a16c4bd75307f05bcffa4d1231872a1346ae6e (patch) | |
tree | 7abb6fd77c91dc6d80979041862140e2f00337ea | |
parent | 672bd4e6ff52da0acad0a5838324ba0039ed484c (diff) | |
download | gitlab-ce-50a16c4bd75307f05bcffa4d1231872a1346ae6e.tar.gz |
Updated Rubymove-project-dropdown-async
-rw-r--r-- | app/controllers/autocomplete_controller.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/controllers/autocomplete_controller.rb b/app/controllers/autocomplete_controller.rb index 61e92c1a805..3865b2d61fd 100644 --- a/app/controllers/autocomplete_controller.rb +++ b/app/controllers/autocomplete_controller.rb @@ -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) |