Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi @palkan,
Today I have faced with an issue:
Amorail::Lead.find ANY_NONEXISTENT_ID => false
I don't it is convenient to return false from #find because one waits for lead instance (if given lead is exists) or nil.
false
#find
nil
It seems like it occurs because of Entity#handle_response returns false.
Entity#handle_response
My proposal is to return nil instead of false.
What do you think?
The text was updated successfully, but these errors were encountered:
Yep, nil is better. Feel free to submit a PR.
Sorry, something went wrong.
[Fix teachbase#25] Return nil if record is not found
9537b7f
624bf8d
630040c
No branches or pull requests
Hi @palkan,
Today I have faced with an issue:
I don't it is convenient to return
false
from#find
because one waits for lead instance (if given lead is exists) ornil
.It seems like it occurs because of
Entity#handle_response
returnsfalse
.My proposal is to return
nil
instead offalse
.What do you think?
The text was updated successfully, but these errors were encountered: