MS fixing small bugs, adding a very dump list of a groups that a friend is in for you

This commit is contained in:
maxwell 2010-08-24 15:47:44 -07:00
parent 92a2df5c77
commit 204c910f66
4 changed files with 7 additions and 4 deletions

View file

@ -14,6 +14,7 @@ class PeopleController < ApplicationController
def show
@person = current_user.visible_person_by_id(params[:id])
@profile = @person.profile
@person_groups = current_user.groups_with_person(@person)
@posts = Post.where(:person_id => @person.id, :_id.in => current_user.visible_post_ids).paginate :page => params[:page], :order => 'created_at DESC'

View file

@ -8,7 +8,7 @@ class User
key :friend_ids, Array
key :pending_request_ids, Array
key :visible_post_ids, Array
key :_post_ids, Array
one :person, :class_name => 'Person', :foreign_key => :owner_id
@ -213,7 +213,7 @@ class User
end
def groups_with_person person
id = ensure_bson person.id
id = ensure_bson person.object_id
groups.select {|group| group.person_ids.include? id}
end

View file

@ -6,7 +6,6 @@
%h1
= @person.real_name
- unless @person.id == current_user.person.id
.right
= link_to 'remove friend', @person, :confirm => 'Are you sure?', :method => :delete, :class => "button"
@ -16,6 +15,8 @@
%i= "last seen: #{how_long_ago(@posts.first)}"
%li
%i= "friends since: #{how_long_ago(@person)}"
%li
="groups: #{@person_groups}"
%li
url:
= @person.url
@ -31,7 +32,7 @@
%h3= "stream - #{@post_count} item(s)"
%ul#stream
- for post in @posts
= render type_partial(post), :post => post
= render type_partial(post), :post => post unless post.class == Album
= will_paginate @posts
- else
%h3 no posts to display!

View file

@ -185,6 +185,7 @@ h1
:weight 200
:color #999
h3
:position relativex
:font