Mid-Level
November 18, 2026

Spot the bug: Ruby on Rails

One snippet. Find the bug, or prove there isn't one.

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
8end

Click the lines that carry the problem.

Your verdict

One attempt per day. The answer shows up right after.

Keep your streak

Create an account to keep your streak and track your progress.

Create an account