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
This commit is contained in:
Robert Speicher 2016-01-15 20:57:56 +00:00
commit 8a028cf3a2
3 changed files with 3 additions and 2 deletions

View file

@ -49,7 +49,7 @@ class Projects::IssuesController < Projects::ApplicationController
assignee_id: ""
)
@issue = @project.issues.new(issue_params)
@issue = @noteable = @project.issues.new(issue_params)
respond_with(@issue)
end

View file

@ -90,6 +90,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
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

View file

@ -25,7 +25,7 @@ class Projects::SnippetsController < Projects::ApplicationController
end
def new
@snippet = @project.snippets.build
@snippet = @noteable = @project.snippets.build
end
def create