From c7f73754a9f5c3bf1ac876839b30206e0d6460db Mon Sep 17 00:00:00 2001 From: Sergio Souza Date: Wed, 18 Oct 2023 11:52:11 -0300 Subject: [PATCH] Fix project ID value on controller --- app/controllers/beta/projects_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/beta/projects_controller.rb b/app/controllers/beta/projects_controller.rb index be01228db..2607e07f9 100644 --- a/app/controllers/beta/projects_controller.rb +++ b/app/controllers/beta/projects_controller.rb @@ -2,7 +2,8 @@ class Beta::ProjectsController < ApplicationController before_action :set_fluid_layout def show - @project_id = params[:id] + @project_id = Project.find_by(slug: params[:id]).id + @project = current_user.projects.friendly.find @project_id authorize @project, policy_class: Beta::ProjectPolicy