Commit 9809e1d4 authored by Matija Čupić's avatar Matija Čupić

Find cluster by id in ClustersController#cluster

Prepares the controller for handling multiple clusters instead of just
one.
parent c3d8bc35
......@@ -88,7 +88,7 @@ class Projects::ClustersController < Projects::ApplicationController
private
def cluster
@cluster ||= project.cluster.present(current_user: current_user)
@cluster ||= project.clusters.find_by(id: params[:id])&.present(current_user: current_user) || render_404
end
def create_params
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment