GitLab steht wegen Wartungsarbeiten am Montag, den 10. Mai, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

Commit ccd44546 authored by Douwe Maan's avatar Douwe Maan

Fix autocomplete on commit and issue/MR edit pages

parent 5a07b760
...@@ -93,7 +93,7 @@ def referenced_merge_request_url ...@@ -93,7 +93,7 @@ def referenced_merge_request_url
end end
def commit def commit
@commit ||= @project.commit(params[:id]) @noteable = @commit ||= @project.commit(params[:id])
end end
def pipelines def pipelines
......
...@@ -176,11 +176,12 @@ def bulk_update ...@@ -176,11 +176,12 @@ def bulk_update
protected protected
def issue def issue
@issue ||= begin @noteable = @issue ||=
@project.issues.find_by!(iid: params[:id]) begin
rescue ActiveRecord::RecordNotFound @project.issues.find_by!(iid: params[:id])
redirect_old rescue ActiveRecord::RecordNotFound
end redirect_old
end
end end
alias_method :subscribable_resource, :issue alias_method :subscribable_resource, :issue
alias_method :issuable, :issue alias_method :issuable, :issue
......
...@@ -324,7 +324,7 @@ def selected_target_project ...@@ -324,7 +324,7 @@ def selected_target_project
end end
def merge_request 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 end
alias_method :subscribable_resource, :merge_request alias_method :subscribable_resource, :merge_request
alias_method :issuable, :merge_request alias_method :issuable, :merge_request
......
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