-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
class User include Mongoid::Document embeds_many :profiles end class Profile include Mongoid::Document embedded_in :user field :likes, :type => Array end User.last.profiles.create(:likes => ["red","orange"]) User.last.profiles.where(:likes => ["red","orange"]).count => 0
This example should work, but results in count => 0
class Profile include Mongoid::Document field :likes, :type => Array end Profile.create(:likes => ["red","orange"]) Profile.where(:likes => ["red","orange"]).count => 1
This example works correctly however