debian-mirror-gitlab/app/presenters/releases/link_presenter.rb

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

13 lines
288 B
Ruby
Raw Normal View History

2022-07-23 23:45:48 +05:30
# 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