Consider the following (corrupt ) param that came into my controller#create method from a select box in the form:
["[\"4e4d58b73f1514345f000058\"]"]
I'm trying to figure out why I'm getting this, although clearly, it isn't Mongoid's fault. However, it's pretty easy through mass assignment, or whatever, for this junk to slip through and be added to the relation array for an object. The result is the following error: undefined method `in_memory' for #<Array:0x0000010959f8d0>. It seems to me that Mongoid should raise a more appropriate error message. While it isn't Mongoid's fault that this junk came in the door, it is a foreseeable event. It was also really nasty to debug. In my case, the request even looked fine in the console.
Thanks,
Paul