-
Type:
Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
I've noticed the following.
If I do:
user = User.first.all user.extend Role user.is_a? Role
returns true as expected.
If I have an objected that is Embedded in the User class like:
def User embeds_one :profile end def Profile embedded_in :user end
and I do the following:
profile = User.all.first.profile profile.user.extend Role profile.user.is_a? Role
it returns false.
I've been struggling to understand why, and I'm wondering whether mongoid is producing this strange behaviour?