summaryrefslogtreecommitdiff
path: root/app/presenters/tree_entry_presenter.rb
blob: 7bb10cd1455ed5a5a00fb7e0597d826d56cfbc8a (plain)
1
2
3
4
5
6
7
8
9
# 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
end