visible_person_by_id should check against self.person.id
This commit is contained in:
parent
d2f50008f7
commit
9f9395bc9c
2 changed files with 5 additions and 2 deletions
|
|
@ -290,7 +290,7 @@ class User
|
||||||
end
|
end
|
||||||
|
|
||||||
def visible_person_by_id( id )
|
def visible_person_by_id( id )
|
||||||
return self if id == self.id
|
return self if id == person.id
|
||||||
friends.detect{|x| x.id == ensure_bson( id ) }
|
friends.detect{|x| x.id == ensure_bson( id ) }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,5 +14,8 @@ describe PeopleController do
|
||||||
|
|
||||||
get :index, :q => "Eu"
|
get :index, :q => "Eu"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'should go to the current_user show page' do
|
||||||
|
get :show, :id => @user.person.id
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue