diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-10-01 18:00:28 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-10-01 18:00:28 +0400 |
commit | ae9dd6276267e0df2d9c2da3b89393e4ee212175 (patch) | |
tree | 4db4314bd54eda3bce6b3c67b719f1f5097fb68a /app/controllers/projects/raw_controller.rb | |
parent | e219cf7246c6a0495e4507deaffeba11e79f13b8 (diff) |
Update code to work with gitlab_git 3
Diffstat (limited to 'app/controllers/projects/raw_controller.rb')
-rw-r--r-- | app/controllers/projects/raw_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/raw_controller.rb b/app/controllers/projects/raw_controller.rb index 0c23d411f4c..8633b225b64 100644 --- a/app/controllers/projects/raw_controller.rb +++ b/app/controllers/projects/raw_controller.rb @@ -8,9 +8,9 @@ class Projects::RawController < Projects::ApplicationController before_filter :require_non_empty_project def show - @blob = Gitlab::Git::Blob.new(@repository, @commit.id, @ref, @path) + @blob = Gitlab::Git::Blob.find(@repository, @commit.id, @path) - if @blob.exists? + if @blob type = if @blob.mime_type =~ /html|javascript/ 'text/plain; charset=utf-8' else |