I have two models:
class User
...
has_and_belongs_to_many :groups
...
end
class Group
...
has_and_belongs_to_many :users
...
end
For some reason the group object doesn't have all the user_ids
. Maybe, because I'm using mongoid 4 alpha version.
Group _id: 123, user_ids: [1, 2, 4]
User _id: 3, group_ids: [123, 456]
Although the big issue is why are those documents unsync, for now I need to know how to sync them at this point.
Thanks in advance,
Victor