#734 ✓resolved
Daniel Tsui

Enumerable's any? method broken in Datamapper::collection

Reported by Daniel Tsui | December 31st, 2008 @ 04:39 PM

The block passed is being ignore and any? is always returning true. It seems to be only broken when using any? with a collection through an association. Maybe the method is being overriden somewhere.

I have a model Person has many Memberships, In irb:

Person.all.any? { |p| p == false } This works fine and would return false

Person.memberships.any? { |p| p == false } This still would return true.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »