debian-mirror-gitlab/app/presenters/tree_entry_presenter.rb
2020-10-24 23:57:45 +05:30

13 lines
382 B
Ruby

# frozen_string_literal: true
class TreeEntryPresenter < Gitlab::View::Presenter::Delegated
presents :tree
def web_url
Gitlab::Routing.url_helpers.project_tree_url(tree.repository.project, File.join(tree.commit_id, tree.path))
end
def web_path
Gitlab::Routing.url_helpers.project_tree_path(tree.repository.project, File.join(tree.commit_id, tree.path))
end
end