Merge branch 'master' of github.com:diaspora/diaspora
This commit is contained in:
commit
b723c5997e
2 changed files with 5 additions and 3 deletions
|
|
@ -14,8 +14,10 @@ class PeopleController < ApplicationController
|
||||||
def show
|
def show
|
||||||
@person = current_user.visible_person_by_id(params[:id])
|
@person = current_user.visible_person_by_id(params[:id])
|
||||||
@profile = @person.profile
|
@profile = @person.profile
|
||||||
@posts = Post.find_all_by_person_id(@person.id).paginate :page => params[:page], :order => 'created_at DESC'
|
|
||||||
@latest_status_message = StatusMessage.newest_for(@person)
|
@posts = Post.where(:person_id => @person.id, :_id.in => current_user.visible_post_ids).paginate :page => params[:page], :order => 'created_at DESC'
|
||||||
|
|
||||||
|
@latest_status_message = current_user.raw_visible_posts.find_all_by__type_and_person_id("StatusMessage", params[:id]).last
|
||||||
@post_count = @posts.count
|
@post_count = @posts.count
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ class Post
|
||||||
|
|
||||||
#Querying
|
#Querying
|
||||||
def self.newest_for(person)
|
def self.newest_for(person)
|
||||||
self.first(:person_id => person.id, :order => '_id desc')
|
self.where(:person_id => person.id, :order => '_id desc')
|
||||||
end
|
end
|
||||||
|
|
||||||
#ENCRYPTION
|
#ENCRYPTION
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue