Commit 8a028cf3 authored by Robert Speicher's avatar Robert Speicher
Browse files

Merge branch 'fix-autocomplete-new-issues' into 'master'

Fix autocomplete for new issues/MRs/snippets

Fixes gitlab-org/gitlab-ce#8067

See merge request !2446
parents d04eadf8 f7240e03
......@@ -49,7 +49,7 @@ def new
assignee_id: ""
)
@issue = @project.issues.new(issue_params)
@issue = @noteable = @project.issues.new(issue_params)
respond_with(@issue)
end
......
......@@ -90,6 +90,7 @@ def builds
def new
params[:merge_request] ||= ActionController::Parameters.new(source_project: @project)
@merge_request = MergeRequests::BuildService.new(project, current_user, merge_request_params).execute
@noteable = @merge_request
@target_branches = if @merge_request.target_project
@merge_request.target_project.repository.branch_names
......
......@@ -25,7 +25,7 @@ def index
end
def new
@snippet = @project.snippets.build
@snippet = @noteable = @project.snippets.build
end
def create
......
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