ohm-crystal icon indicating copy to clipboard operation
ohm-crystal copied to clipboard

Fetch by id results in exception not nil

Open vanhecke opened this issue 6 years ago • 0 comments

The readme describes the following behaviour:

# Trying to find a non existent party
Party[2]
# => nil

But doing this operation will actually result in a Ohm::RecordNotFound exception. The following is not working:

if party = Party[id]
	#work with object
else
	#handle not found
end

vanhecke avatar Dec 27 '19 15:12 vanhecke