Shorten ensure_bson

This commit is contained in:
Raphael 2010-08-16 11:47:23 -07:00
parent f4d6a04f4f
commit a8b402636a

View file

@ -212,10 +212,6 @@ class User
end
def ensure_bson id
if id.class == String
BSON::ObjectID(id)
else
id
end
id.class == String ? BSON::ObjectID(id) : id
end
end