gitlab-org--gitlab-foss/app/presenters/project_clusterable_presenter.rb
Thong Kuah 1163b23539 Move view and path concerns to presenters
- Move show path for cluster to ClusterPresenter

- Create ClusterablePresenter to encapsulate logic. Consolidates
scattered methods from BaseController and ClustersHelper into an object.
2018-11-01 19:37:32 +13:00

15 lines
337 B
Ruby

# frozen_string_literal: true
class ProjectClusterablePresenter < ClusterablePresenter
def index_path
project_clusters_path(clusterable)
end
def new_path
new_project_cluster_path(clusterable)
end
def clusterable_params
{ project_id: clusterable.to_param, namespace_id: clusterable.namespace.to_param }
end
end