summaryrefslogtreecommitdiff
path: root/app/presenters/milestone_presenter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/presenters/milestone_presenter.rb')
-rw-r--r--app/presenters/milestone_presenter.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/presenters/milestone_presenter.rb b/app/presenters/milestone_presenter.rb
new file mode 100644
index 00000000000..7d9045ddebe
--- /dev/null
+++ b/app/presenters/milestone_presenter.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class MilestonePresenter < Gitlab::View::Presenter::Delegated
+ presents :milestone
+
+ def milestone_path
+ url_builder.milestone_path(milestone)
+ end
+
+ private
+
+ def url_builder
+ @url_builder ||= Gitlab::UrlBuilder.new(milestone)
+ end
+end