diff --git a/app/models/user.rb b/app/models/user.rb index 647fe3172..28e750789 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -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