summaryrefslogtreecommitdiff
path: root/app/controllers/projects/blob_controller.rb
blob: ba466251b29db862d5b3220f5338d4bf9e0f2b93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Controller for viewing a file's blame
class Projects::BlobController < Projects::ApplicationController
  include ExtractsPath

  # Authorize
  before_filter :authorize_read_project!
  before_filter :authorize_code_access!
  before_filter :require_non_empty_project

  def show
    @blob = @repository.blob_at(@commit.id, @path)

    not_found! unless @blob
  end
end