debian-mirror-gitlab/app/presenters/tree_entry_presenter.rb

14 lines
391 B
Ruby
Raw Normal View History

2019-09-04 21:01:54 +05:30
# frozen_string_literal: true
class TreeEntryPresenter < Gitlab::View::Presenter::Delegated
2021-11-18 22:05:49 +05:30
presents nil, as: :tree
2019-09-04 21:01:54 +05:30
def web_url
Gitlab::Routing.url_helpers.project_tree_url(tree.repository.project, File.join(tree.commit_id, tree.path))
end
2020-10-24 23:57:45 +05:30
def web_path
Gitlab::Routing.url_helpers.project_tree_path(tree.repository.project, File.join(tree.commit_id, tree.path))
end
2019-09-04 21:01:54 +05:30
end