gitlab-org--gitlab-foss/app/models/blob_viewer/license.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
352 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2017-05-08 19:50:23 -04:00
module BlobViewer
class License < Base
include Auxiliary
include Static
2017-05-08 19:50:23 -04:00
self.partial_name = 'license'
self.file_types = %i(license)
2017-05-08 19:50:23 -04:00
self.binary = false
def license
project.repository.license
2017-05-08 19:50:23 -04:00
end
def render_error
return if license
:unknown_license
end
end
end