Could also override Enumberable's any? in case a block wasn't sent.

On Thursday, July 2, 2015 at 4:27:43 PM UTC-7, Elad Ossadon wrote:
>
> However, it's a common ActiveSupport method.
>
> On Thursday, July 2, 2015 at 4:23:32 PM UTC-7, Elad Ossadon wrote:
>>
>> Thanks! How about present?
>>
>> On Thursday, July 2, 2015 at 4:21:54 PM UTC-7, Jeremy Evans wrote:
>>>
>>> On Thursday, July 2, 2015 at 4:11:14 PM UTC-7, Elad Ossadon wrote:
>>>>
>>>> Feature request:
>>>>
>>>> Have exists? method for dataset:
>>>>
>>>> Article.where(slug: "hello").exists?
>>>>
>>>
>>> This would basically just be the opposite of empty?
>>>
>>>   !Article.where(slug: 'hello').empty?
>>>  
>>> One of the reasons I don't like the name exists? is that exists? implies 
>>> a single record, but it is called on the dataset.  Even if the dataset is 
>>> empty, it still exists.
>>>
>>> I'm not sure an additional method is needed, since the desired behavior 
>>> is just !empty?, but I'm certainly willing to consider other people's 
>>> opinions, and possible alternative method names if they are in favor of 
>>> adding such a method.
>>>
>>> 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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to