I have a simple model object:
class UserRating
include MongoMapper::EmbeddedDocument
key :idea_id, ObjectId
key :rating, Integer
end
I am trying to set Idea_Id on this object with: user_rating.idea_id = ObjectId.new
It throws: "illegal ObjectID format"
This seems like simple code ... The only thing I notice is ObjectID! = ObjectId. This may be a problem with the error message. Not sure. Very simple code. I don’t know why I cannot make it work. If this helps, this happens in the context of the Rails 3 Beta 4 project inside the Cucumber test. I successfully hit the mongodb daemon so that there is no strange connection problem. It would be very helpful if pointers.