On Tue, Nov 8, 2022 at 7:02 AM Tomás Miguez <[email protected]> wrote:

> Hello,
> I was reading the documentation for the find method of model (
> https://www.rubydoc.info/github/jeremyevans/sequel/Sequel%2FModel%2FClassMethods:find)
> and noticed that it recommends using other approaches: "You are encouraged
> to use Model.[] or Model.first instead of this method."
> Why might this be so? I've checked the source code and original commit to
> see if there was some extra info but didn't find anything.
>

Model.find just calls Model.first, so you should use Model.first directly
in any case where you are calling Model.find.  One issue with Model.find is
that some people may assume it works like ActiveRecord's find method, and
it doesn't.  There isn't any technical issue with calling Model.find.

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/CADGZSSf_6tZXBLE6oH9uapU0uDyLVoXnhk-GUBH2VAd52qtwRg%40mail.gmail.com.

Reply via email to