debian-mirror-gitlab/app/presenters/releases/link_presenter.rb
2022-07-23 20:15:48 +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