gitlab-org--gitlab-foss/app/controllers/projects/clusters_controller.rb
James Edwards-Jones bedb9a3e6d Avoid passing not_found_or_authorized_proc around
Since this needs to be called on every find_routable!(Project, ...
we can instead move it to a RoutableActions check.
2019-05-15 17:36:50 +07:00

22 lines
487 B
Ruby

# frozen_string_literal: true
class Projects::ClustersController < Clusters::ClustersController
prepend_before_action :project
before_action :repository
layout 'project'
private
def clusterable
@clusterable ||= ClusterablePresenter.fabricate(project, current_user: current_user)
end
def project
@project ||= find_routable!(Project, File.join(params[:namespace_id], params[:project_id]))
end
def repository
@repository ||= project.repository
end
end