Commit d9c20cf5 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix 404 errors on Merge Request -> new

parent b6fc0310
...@@ -65,4 +65,9 @@ module CommitsHelper ...@@ -65,4 +65,9 @@ module CommitsHelper
end end
end end
def commit_to_html commit
if commit.model
escape_javascript(render 'commits/commit', commit: commit)
end
end
end end
:plain :plain
$(".mr_source_commit").html("#{escape_javascript(render 'commits/commit', commit: @commit)}"); $(".mr_source_commit").html("#{commit_to_html(@commit)}");
:plain :plain
$(".mr_target_commit").html("#{escape_javascript(render 'commits/commit', commit: @commit)}"); $(".mr_target_commit").html("#{commit_to_html(@commit)}");
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