BsonObjectID.typecast_to_primitive accepts an object in an array for Rails/Devise compatability.