Confirmé
18 novembre 2026Trouve le bug : Ruby on Rails
Un extrait de code. Trouve le bug, ou prouve qu'il n'y en a pas.
ruby
1class UsersController < ApplicationController
2 def show
3 @user = User.find(params[:id])
4 render json: @user
5 rescue ActiveRecord::RecordNotFound
6 render json: { error: 'User not found' }, status: :not_found
7 end
8endClique sur les lignes qui posent problème.
Ton verdict
Une tentative par jour. La réponse s'affiche juste après.
Garde ta série
Crée un compte pour conserver ta série et suivre ta progression.