We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e4e472d commit acd01c0Copy full SHA for acd01c0
app/controllers/api/v2/plans_controller.rb
@@ -10,7 +10,7 @@ class PlansController < BaseApiController # rubocop:todo Style/Documentation
10
def show
11
raise Pundit::NotAuthorizedError unless @scopes.include?('read')
12
13
- @plan = Plan.includes(roles: :user).find(params[:id])
+ @plan = Plan.includes(roles: :user).find_by(id: params[:id])
14
15
raise Pundit::NotAuthorizedError unless @plan.present?
16
0 commit comments