On Tuesday, March 12, 2013 5:41:10 PM UTC-7, Michael Lang wrote:

> whiny_find(*args) 
>
> :-D 
>
> What about sticking with find, but pass an argument, say ":except => 
> true" in when we want the behavior to raise an exception instead of 
> returning nil? 
>

We could add the ability for .find to take an options hash, but I think a 
new method is a better API.  Another issue with using .find is that you 
cannot pass a primary key value to it, unlike .[].  So any method name with 
find in it is probably out.

I definitely want the method name to not be verbose.  The best method name 
I can think of at this point is lookup:

  Model.lookup(1)
  Model.lookup(:bar=>'foo')

I'm certainly open to better suggestions.

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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to