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:
commit
8a028cf3a2
3 changed files with 3 additions and 2 deletions
|
@ -49,7 +49,7 @@ class Projects::IssuesController < Projects::ApplicationController
|
||||||
assignee_id: ""
|
assignee_id: ""
|
||||||
)
|
)
|
||||||
|
|
||||||
@issue = @project.issues.new(issue_params)
|
@issue = @noteable = @project.issues.new(issue_params)
|
||||||
respond_with(@issue)
|
respond_with(@issue)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -90,6 +90,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
|
||||||
def new
|
def new
|
||||||
params[:merge_request] ||= ActionController::Parameters.new(source_project: @project)
|
params[:merge_request] ||= ActionController::Parameters.new(source_project: @project)
|
||||||
@merge_request = MergeRequests::BuildService.new(project, current_user, merge_request_params).execute
|
@merge_request = MergeRequests::BuildService.new(project, current_user, merge_request_params).execute
|
||||||
|
@noteable = @merge_request
|
||||||
|
|
||||||
@target_branches = if @merge_request.target_project
|
@target_branches = if @merge_request.target_project
|
||||||
@merge_request.target_project.repository.branch_names
|
@merge_request.target_project.repository.branch_names
|
||||||
|
|
|
@ -25,7 +25,7 @@ class Projects::SnippetsController < Projects::ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def new
|
def new
|
||||||
@snippet = @project.snippets.build
|
@snippet = @noteable = @project.snippets.build
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
|
Loading…
Reference in a new issue