diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-21 16:09:15 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-24 13:29:36 +0300 |
commit | 84a1590252c63c710bceaa7a394799cdc5109505 (patch) | |
tree | 12d9b499acad48dc9420d095803705093d2b135d /app/views/projects | |
parent | b0ed2ff1a69df384a1cb9a184c0528bec1986827 (diff) |
Let commit model know about its project.
Diffstat (limited to 'app/views/projects')
-rw-r--r-- | app/views/projects/blame/show.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/commits/_commit_list.html.haml | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/views/projects/blame/show.html.haml b/app/views/projects/blame/show.html.haml index e6a859fea8f..89dd68d6471 100644 --- a/app/views/projects/blame/show.html.haml +++ b/app/views/projects/blame/show.html.haml @@ -12,7 +12,7 @@ .file-content.blame.highlight %table - @blame.each do |commit, lines, since| - - commit = Commit.new(commit) + - commit = Commit.new(commit, @project) %tr %td.blame-commit %span.commit diff --git a/app/views/projects/commits/_commit_list.html.haml b/app/views/projects/commits/_commit_list.html.haml index 2ee7d73bd20..ce60fbdf032 100644 --- a/app/views/projects/commits/_commit_list.html.haml +++ b/app/views/projects/commits/_commit_list.html.haml @@ -3,9 +3,9 @@ Commits (#{@commits.count}) - if @commits.size > MergeRequestDiff::COMMITS_SAFE_SIZE %ul.well-list - - Commit.decorate(@commits.first(MergeRequestDiff::COMMITS_SAFE_SIZE)).each do |commit| + - Commit.decorate(@commits.first(MergeRequestDiff::COMMITS_SAFE_SIZE), @project).each do |commit| = render "projects/commits/inline_commit", commit: commit, project: @project %li.warning-row.unstyled other #{@commits.size - MergeRequestDiff::COMMITS_SAFE_SIZE} commits hidden to prevent performance issues. - else - %ul.well-list= render Commit.decorate(@commits), project: @project + %ul.well-list= render Commit.decorate(@commits, @project), project: @project |