Commit c4f91fe4 authored by Shinya Maeda's avatar Shinya Maeda

Optimize Projects::ClustersController#cluster

parent b716bba7
......@@ -59,7 +59,8 @@ class Projects::ClustersController < Projects::ApplicationController
private
def cluster
@cluster ||= project.clusters.find(params[:id]).present(current_user: current_user) || render_404
@cluster ||= project.clusters.find_by!(id: params[:id])
.present(current_user: current_user)
end
def update_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