From 94390fc7b42e92d4e1d38c8392a2e310a256c4ca Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 3 Apr 2013 09:26:38 +0300 Subject: Proper routing. blobs for blobs, raw for send_data --- app/controllers/blob_controller.rb | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'app/controllers/blob_controller.rb') diff --git a/app/controllers/blob_controller.rb b/app/controllers/blob_controller.rb index 530b72fee7f..3547dfe2323 100644 --- a/app/controllers/blob_controller.rb +++ b/app/controllers/blob_controller.rb @@ -8,15 +8,6 @@ class BlobController < ProjectResourceController before_filter :require_non_empty_project def show - if @tree.is_blob? - send_data( - @tree.data, - type: @tree.mime_type, - disposition: 'inline', - filename: @tree.name - ) - else - not_found! - end + @blob = Gitlab::Git::Blob.new(@repository, @commit.id, @ref, @path) end end -- cgit v1.2.1