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
|
||||
|
||||
def ensure_bson id
|
||||
if id.class == String
|
||||
BSON::ObjectID(id)
|
||||
else
|
||||
id
|
||||
end
|
||||
id.class == String ? BSON::ObjectID(id) : id
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue