fix UrlGenerationError: No route matches
This commit is contained in:
parent
7a151b4fc8
commit
c9bda80cbb
|
@ -180,6 +180,7 @@ class PullRequest < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def clone
|
def clone
|
||||||
|
return if from_project.nil?
|
||||||
git = Grit::Git.new(path)
|
git = Grit::Git.new(path)
|
||||||
if new_record? || !git.exist?
|
if new_record? || !git.exist?
|
||||||
#~ FileUtils.mkdir_p(path)
|
#~ FileUtils.mkdir_p(path)
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
%a{name: "diff-#{pull_diff_counter}"}
|
%a{name: "diff-#{pull_diff_counter}"}
|
||||||
.top
|
.top
|
||||||
.l= h(pull_diff.renamed_file ? "#{pull_diff.a_path.rtruncate 60}=>#{pull_diff.b_path.rtruncate 60}" : pull_diff.b_path.rtruncate(120))
|
.l= h(pull_diff.renamed_file ? "#{pull_diff.a_path.rtruncate 60}=>#{pull_diff.b_path.rtruncate 60}" : pull_diff.b_path.rtruncate(120))
|
||||||
.r= link_to "view file @ #{short_hash_id(commit_id)}", blob_path(@pull.from_project, commit_id, pull_diff.b_path)
|
- if @pull.from_project.present?
|
||||||
|
.r= link_to "view file @ #{short_hash_id(commit_id)}", blob_path(@pull.from_project, commit_id, pull_diff.b_path)
|
||||||
.clear
|
.clear
|
||||||
-if pull_diff.diff.present? && !(@pull.repo.tree(commit_id) / pull_diff.b_path).binary?
|
-if pull_diff.diff.present? && !(@pull.repo.tree(commit_id) / pull_diff.b_path).binary?
|
||||||
.diff_data=render_diff(pull_diff, diff_counter: pull_diff_counter, comments: @comments)
|
.diff_data=render_diff(pull_diff, diff_counter: pull_diff_counter, comments: @comments)
|
||||||
|
|
Loading…
Reference in New Issue