From c6f45956ccfc716b03db8a7683cb7ba25aed1512 Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Thu, 18 Oct 2012 18:50:43 +0600 Subject: [PATCH] [refs #90] fixed error by 24fd99b2d5cab --- app/controllers/projects/pull_requests_controller.rb | 2 +- app/views/projects/pull_requests/_pull_diff.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/projects/pull_requests_controller.rb b/app/controllers/projects/pull_requests_controller.rb index 5fa552e35..20e06f79d 100644 --- a/app/controllers/projects/pull_requests_controller.rb +++ b/app/controllers/projects/pull_requests_controller.rb @@ -128,7 +128,7 @@ class Projects::PullRequestsController < Projects::BaseController end def load_diff_commits_data - @commits = @pull.repo.commits_between(@pull.from_commit, @pull.to_commit) + @commits = @pull.repo.commits_between(@pull.to_commit, @pull.from_commit) @total_commits = @commits.count @commits = @commits.last(100) diff --git a/app/views/projects/pull_requests/_pull_diff.html.haml b/app/views/projects/pull_requests/_pull_diff.html.haml index 931084e7e..e4b694993 100644 --- a/app/views/projects/pull_requests/_pull_diff.html.haml +++ b/app/views/projects/pull_requests/_pull_diff.html.haml @@ -1,4 +1,4 @@ -- commit_id = pull_diff.deleted_file ? @base_commit.id : @head_commit.id +- commit_id = pull_diff.deleted_file ? @pull.to_commit.id : @pull.from_commit.id .file %a{:name => "diff-#{pull_diff_counter}"} .top