Find cluster by id in ClustersController#cluster
Prepares the controller for handling multiple clusters instead of just one.
This commit is contained in:
parent
c3d8bc3548
commit
9809e1d404
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue