-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Associations
-
None
-
Fully Compatible
After these changes MONGOID-4890, we have #any? method, which has the wrong behavior:
roles = user.roles.where(name: 'admin') user.roles.any? { |role| role == 'user' } # => true
That happens because `#any?` method doesn't check block.
We need to add
return super if block_given?
right after def any?
- is caused by
-
MONGOID-4890 Destroying model instances with dependent associations in transactions raises OperationFailure due to use of (deprecated) count
- Closed
- is related to
-
MONGOID-4959 Document any? in tutorial
- Closed