debian-mirror-gitlab/app/presenters/releases/link_presenter.rb
2022-07-29 14:03:07 +02:00

12 lines
288 B
Ruby

# frozen_string_literal: true
module Releases
class LinkPresenter < Gitlab::View::Presenter::Delegated
def direct_asset_url
return @subject.url unless @subject.filepath
release = @subject.release.present
release.download_url(@subject.filepath)
end
end
end