find() with nil when there are no records December 22, 2022 by Tarik Yes, just do: Challenge.find_by_id(10) For Rails 4 and 5: Challenge.find_by(id: 10)