-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
I have has_and_belongs_to_many :items, inverse_of: nil, validate: false on my model.
When I do add_to_set(:items, new_item), I see the following in the DB:
MOPED: 127.0.0.1:27017 UPDATE database=development collection=things selector={"_id"=>"50fc9e52679d6b729500001a"} update={"$addToSet"=>{"item_ids"=>"50fc9f64679d6b1a3000002d"}} flags=[] (0.0682ms)
So far so good.
The problem is, as soon as this operation completes, I get a bizarre {{NoMethodError (undefined method }}each' for 2013-01-21 01:51:03 UTC:Time):{{ exception even though I don't have }}each{{ in my code. The exception appears to be coming from the conversion of }}new_item{{'s value to }}:items`