Fix 404 errors on Merge Request -> new

This commit is contained in:
Dmitriy Zaporozhets 2012-10-31 14:29:42 +02:00
parent b6fc031031
commit d9c20cf5a6
3 changed files with 7 additions and 3 deletions

View file

@ -65,4 +65,9 @@ module CommitsHelper
end
end
def commit_to_html commit
if commit.model
escape_javascript(render 'commits/commit', commit: commit)
end
end
end

View file

@ -1,2 +1,2 @@
:plain
$(".mr_source_commit").html("#{escape_javascript(render 'commits/commit', commit: @commit)}");
$(".mr_source_commit").html("#{commit_to_html(@commit)}");

View file

@ -1,3 +1,2 @@
:plain
$(".mr_target_commit").html("#{escape_javascript(render 'commits/commit', commit: @commit)}");
$(".mr_target_commit").html("#{commit_to_html(@commit)}");