Shorten ensure_bson
This commit is contained in:
parent
f4d6a04f4f
commit
a8b402636a
1 changed files with 1 additions and 5 deletions
|
|
@ -212,10 +212,6 @@ class User
|
||||||
end
|
end
|
||||||
|
|
||||||
def ensure_bson id
|
def ensure_bson id
|
||||||
if id.class == String
|
id.class == String ? BSON::ObjectID(id) : id
|
||||||
BSON::ObjectID(id)
|
|
||||||
else
|
|
||||||
id
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue