-
Type: Bug
-
Resolution: Duplicate
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: Associations
-
None
For example I have those two classes:
class User include Mongoid::Document end class Post include Mongoid::Document belongs_to :user, class_name: "User" end
The issue is that I can't check whether association returns a module instance (fails for any module).
Mongoid::Document === Post.last.user #=> false, but expected true
But
Mongoid::Document === Post.last.user.reload #=> true, as expected works just ok{{}}
- duplicates
-
MONGOID-4590 Association proxy objects are not correctly compared with === on RHS
- Closed
- is duplicated by
-
MONGOID-5088 Check whether module included in association fails
- Closed