summaryrefslogtreecommitdiff
path: root/app/controllers/blob_controller.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-04-03 09:26:38 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-04-03 09:26:38 +0300
commit94390fc7b42e92d4e1d38c8392a2e310a256c4ca (patch)
tree59ea43b8a0de43727b841c2d55b250411b024f48 /app/controllers/blob_controller.rb
parent88abe66c27504bcda71fd0ddbeb22d0115b8c09f (diff)
downloadgitlab-ce-94390fc7b42e92d4e1d38c8392a2e310a256c4ca.tar.gz
Proper routing. blobs for blobs, raw for send_data
Diffstat (limited to 'app/controllers/blob_controller.rb')
-rw-r--r--app/controllers/blob_controller.rb11
1 files changed, 1 insertions, 10 deletions
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