From 9fcc02a580cfcb581f74e648175b55e4a2e60c42 Mon Sep 17 00:00:00 2001 From: Raphael Date: Tue, 17 Aug 2010 19:56:21 -0700 Subject: [PATCH] Ensure bson on visible person --- app/models/user.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 791664550..f0eca9efb 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -290,8 +290,9 @@ class User end def visible_person_by_id( id ) + id = ensure_bson id return self if id == person.id - friends.detect{|x| x.id == ensure_bson( id ) } + friends.detect{|x| x.id == id } end def group_by_id( id )