diff options
-rw-r--r-- | app/controllers/projects/issues_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects/merge_requests_controller.rb | 1 | ||||
-rw-r--r-- | app/controllers/projects/snippets_controller.rb | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index f476afb2d92..68244883803 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -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 diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index de948d271c8..a6284a24223 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -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 diff --git a/app/controllers/projects/snippets_controller.rb b/app/controllers/projects/snippets_controller.rb index 2104c7a7a71..92b0caa2efb 100644 --- a/app/controllers/projects/snippets_controller.rb +++ b/app/controllers/projects/snippets_controller.rb @@ -25,7 +25,7 @@ class Projects::SnippetsController < Projects::ApplicationController end def new - @snippet = @project.snippets.build + @snippet = @noteable = @project.snippets.build end def create |