Fix autocomplete on commit and issue/MR edit pages
This commit is contained in:
parent
5a07b760df
commit
ccd4454658
|
|
@ -93,7 +93,7 @@ class Projects::CommitController < Projects::ApplicationController
|
|||
end
|
||||
|
||||
def commit
|
||||
@commit ||= @project.commit(params[:id])
|
||||
@noteable = @commit ||= @project.commit(params[:id])
|
||||
end
|
||||
|
||||
def pipelines
|
||||
|
|
|
|||
|
|
@ -176,11 +176,12 @@ class Projects::IssuesController < Projects::ApplicationController
|
|||
protected
|
||||
|
||||
def issue
|
||||
@issue ||= begin
|
||||
@project.issues.find_by!(iid: params[:id])
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
redirect_old
|
||||
end
|
||||
@noteable = @issue ||=
|
||||
begin
|
||||
@project.issues.find_by!(iid: params[:id])
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
redirect_old
|
||||
end
|
||||
end
|
||||
alias_method :subscribable_resource, :issue
|
||||
alias_method :issuable, :issue
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
|
|||
end
|
||||
|
||||
def merge_request
|
||||
@merge_request ||= @project.merge_requests.find_by!(iid: params[:id])
|
||||
@issuable = @merge_request ||= @project.merge_requests.find_by!(iid: params[:id])
|
||||
end
|
||||
alias_method :subscribable_resource, :merge_request
|
||||
alias_method :issuable, :merge_request
|
||||
|
|
|
|||
Loading…
Reference in New Issue