fixed compare for push
This commit is contained in:
parent
f6f939eeb8
commit
1924de91c5
2 changed files with 6 additions and 2 deletions
|
@ -56,4 +56,8 @@ class Commit
|
||||||
def prev_commit
|
def prev_commit
|
||||||
parents.first
|
parents.first
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def prev_commit_id
|
||||||
|
prev_commit.id
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
= time_ago_in_words(event.created_at)
|
= time_ago_in_words(event.created_at)
|
||||||
ago.
|
ago.
|
||||||
- if event.commits.count > 1
|
- if event.commits.count > 1
|
||||||
= link_to compare_project_commits_path(event.project, :from => event.commits.last, :to => event.commits.first) do
|
= link_to compare_project_commits_path(event.project, :from => event.commits.first.prev_commit_id, :to => event.commits.last.id) do
|
||||||
Compare #{event.commits.last.id[0..8]}...#{event.commits.first.id[0..8]}
|
Compare #{event.commits.first.commit.id[0..8]}...#{event.commits.last.id[0..8]}
|
||||||
- @project = event.project
|
- @project = event.project
|
||||||
%ul.unstyled
|
%ul.unstyled
|
||||||
= render event.commits
|
= render event.commits
|
||||||
|
|
Loading…
Reference in a new issue