gitlab-org--gitlab-foss/app/controllers/blame_controller.rb

17 lines
382 B
Ruby
Raw Normal View History

# Controller for viewing a file's blame
2012-09-27 07:44:53 -04:00
class BlameController < ProjectController
include ExtractsPath
# Authorize
before_filter :authorize_read_project!
before_filter :authorize_code_access!
before_filter :require_non_empty_project
before_filter :assign_ref_vars
def show
@repo = @project.repo
@blame = Grit::Blob.blame(@repo, @commit.id, @path)
end
end