diff options
author | Matija Čupić <matteeyah@gmail.com> | 2017-11-15 22:15:48 +0300 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2017-11-16 16:32:52 +0300 |
commit | 9809e1d404ed1d386ac07e08e4832656325e5971 (patch) | |
tree | 97c027ab1f3dc5c79c1a16231c03f2c1f16c694e /app/controllers/projects/clusters_controller.rb | |
parent | c3d8bc354844defee3375f8cb7a94d5a1002b1db (diff) |
Find cluster by id in ClustersController#cluster
Prepares the controller for handling multiple clusters instead of just
one.
Diffstat (limited to 'app/controllers/projects/clusters_controller.rb')
-rw-r--r-- | app/controllers/projects/clusters_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/projects/clusters_controller.rb b/app/controllers/projects/clusters_controller.rb index 9a56c9de858..7808284fb82 100644 --- a/app/controllers/projects/clusters_controller.rb +++ b/app/controllers/projects/clusters_controller.rb @@ -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 |