diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-02-02 15:06:14 +0100 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-02-02 15:06:14 +0100 |
commit | b67f8eee0d2810be4a010c5e968e1848b4ca3c88 (patch) | |
tree | b86b10a2c2850dfa808f06b299f548730d63f5c3 | |
parent | b1f22aa35aa62d72f514b3f9beee0a190b6599cc (diff) | |
download | gitlab-ce-b67f8eee0d2810be4a010c5e968e1848b4ca3c88.tar.gz |
Use @repository
-rw-r--r-- | app/controllers/projects/avatars_controller.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/controllers/projects/avatars_controller.rb b/app/controllers/projects/avatars_controller.rb index bc40e601030..f7e6bb34443 100644 --- a/app/controllers/projects/avatars_controller.rb +++ b/app/controllers/projects/avatars_controller.rb @@ -2,11 +2,10 @@ class Projects::AvatarsController < Projects::ApplicationController before_action :project def show - repository = @project.repository - @blob = repository.blob_at_branch('master', @project.avatar_in_git) + @blob = @repository.blob_at_branch('master', @project.avatar_in_git) if @blob headers['X-Content-Type-Options'] = 'nosniff' - headers.store(*Gitlab::Workhorse.send_git_blob(repository, @blob)) + headers.store(*Gitlab::Workhorse.send_git_blob(@repository, @blob)) headers['Content-Disposition'] = 'inline' headers['Content-Type'] = @blob.content_type head :ok # 'render nothing: true' messes up the Content-Type |