better error handling for not found resource, gitolite error

This commit is contained in:
Dmitriy Zaporozhets 2012-02-22 07:14:54 +02:00
parent 9e6d0710e9
commit 7d279f9302
9 changed files with 73 additions and 7 deletions

View file

@ -36,7 +36,7 @@ class MergeRequestsController < ApplicationController
def show
unless @project.repo.heads.map(&:name).include?(@merge_request.target_branch) &&
@project.repo.heads.map(&:name).include?(@merge_request.source_branch)
head(404)and return
git_not_found! and return
end
@notes = @merge_request.notes.inc_author.order("created_at DESC").limit(20)