Skip to content

Commit

Permalink
fix: query project table twice
Browse files Browse the repository at this point in the history
  • Loading branch information
Guilherme-NL committed Oct 27, 2023
1 parent 60ad0e6 commit 54ed1df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/controllers/beta/projects_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ class Beta::ProjectsController < ApplicationController
before_action :set_fluid_layout

def show
@project_id = Project.find_by(slug: params[:id]).id

@project = current_user.projects.friendly.find @project_id
project_slug = params[:id]
@project = current_user.projects.friendly.find project_slug
@project_id = @project.id

authorize @project, policy_class: Beta::ProjectPolicy
update_current_team
Expand Down

0 comments on commit 54ed1df

Please sign in to comment.